2016-02-20 59 views
0

我是相當新的Android和我需要設置ENV建包(不是從RHEL Linux機器發展。如何在RHEL Linux的安裝Android SDK與平臺和構建工具

我需要安裝Android sdk在RHEL linux機器上(不是ubuntu),我不能打開sdk管理器來下載平臺工具和編譯工具,請讓我知道是否有一些機構已經做到了這一點,這是編譯和構建過程所必需的。雖然試圖更新平臺是沒有可用的目標

我的基本要求是設置環境來構建和生成apk包(代碼是由開發人員開發的,我的要求是隻是co mpile並建立包)

$ android list target 
Available Android targets: 

$ android update sdk -u 
Refresh Sources: 
    Fetching https://dl.google.com/android/repository/addons_list-2.xml 
    Fetched Add-ons List successfully 
    Refresh Sources 
    Fetching URL: https://dl.google.com/android/repository/repository-11.xml 
Refresh Sources: 
    Fetching URL: https://dl.google.com/android/repository/repository-11.xml 
Refresh Sources: 
    Fetching URL: https://dl.google.com/android/repository/repository-11.xml 
Refresh Sources: 
    Fetching URL: https://dl.google.com/android/repository/repository-11.xml 
There is nothing to install or update. 
+0

也許這樣? https://fedoraproject.org/wiki/HOWTO_Setup_Android_Development#Install_Android_SDK –

+0

不,這不工作,我需要在平臺目錄內製作一個構建工具 –

+0

不確定你的意思...不要只是下載特定的SDK版本才能獲得構建工具? –

回答

0

您可以下載Android SDK工具與此網址:

版本可以在這裏找到:

https://dl.google.com/android/repository/repository-11.xml

這裏一個小腳本來做到這一點:

#!/usr/bin/bash 
ANDROID_SDK_TOOLS=$1 #25.2.3 
ANDROID_SDK_PLATFORM_TOOLS=$2 #25.0.3 
ANDROID_SDK_BUILD_TOOLS=$3 #25.0.2 
ANDROID_PLATFORM=$4 #25_r03 

wget https://dl.google.com/android/repository/platform-tools_r${ANDROID_SDK_PLATFORM_TOOLS}-linux.zip 
wget http://dl.google.com/android/repository/build-tools_r${ANDROID_SDK_BUILD_TOOLS}-linux.zip 
wget https://dl.google.com/android/repository/tools_r${ANDROID_SDK_TOOLS}-linux.zip 
wget https://dl.google.com/android/repository/platform-${ANDROID_PLATFORM}.zip 
相關問題