該文章介紹下如何在Linux下配置Android SDK。
一、下載android sdk
下載SDK,下載地址點擊這裡,選擇Linux(i386)。因為SDK只有32位的,如果裝的是64位系統,則要安裝ia32-libs,運行32位程序。安裝命令:sudo apt-get install ia32-libs(在Ubuntu中的命令)。下載完成後解壓,在終端進入到SDK的根目錄,然後執行:tools/android update sdk –no-ui即可開始和Windows裡面一樣的更新。
- [root@app-server1 tools]# android update sdk --no-ui
- Refresh Sources:
- Fetching https://dl-ssl.google.com/android/repository/addons_list-1.xml
- Validate XML
- Parse XML
- Fetched Add-ons List successfully
- Refresh Sources
- Fetching URL: https://dl-ssl.google.com/android/repository/repository-6.xml
- Validate XML: https://dl-ssl.google.com/android/repository/repository-6.xml
- Parse XML: https://dl-ssl.google.com/android/repository/repository-6.xml
- Fetching URL: https://dl-ssl.google.com/android/repository/addon.xml
- Validate XML: https://dl-ssl.google.com/android/repository/addon.xml
- Parse XML: https://dl-ssl.google.com/android/repository/addon.xml
- Fetching URL: http://dl.htcdev.com/sdk/addon.xml
- Validate XML: http://dl.htcdev.com/sdk/addon.xml
- Parse XML: http://dl.htcdev.com/sdk/addon.xml
- Fetching URL: http://software.intel.com/sites/landingpage/android/addon.xml
- Validate XML: http://software.intel.com/sites/landingpage/android/addon.xml
- Parse XML: http://software.intel.com/sites/landingpage/android/addon.xml
- Fetching URL: http://www.echobykyocera.com/download/echo_repository.xml
- Validate XML: http://www.echobykyocera.com/download/echo_repository.xml
- Parse XML: http://www.echobykyocera.com/download/echo_repository.xml
- Fetching URL: http://developer.lgmobile.com/sdk/android/repository.xml
- Validate XML: http://developer.lgmobile.com/sdk/android/repository.xml
- Parse XML: http://developer.lgmobile.com/sdk/android/repository.xml
- Fetching URL: http://android-sdk-addons.motodevupdate.com/addons.xml
- Validate XML: http://android-sdk-addons.motodevupdate.com/addons.xml
- Parse XML: http://android-sdk-addons.motodevupdate.com/addons.xml
- Fetching URL: http://innovator.samsungmobile.com/android/repository/repository.xml
- Validate XML: http://innovator.samsungmobile.com/android/repository/repository.xml
- Parse XML: http://innovator.samsungmobile.com/android/repository/repository.xml
- Fetching URL: http://developer.sonymobile.com/edk/android/repository.xml
- Validate XML: http://developer.sonymobile.com/edk/android/repository.xml
- Parse XML: http://developer.sonymobile.com/edk/android/repository.xml
- Installing Archives:
- Preparing to install archives
- Downloading Android SDK Platform-tools, revision 11
- Installing Android SDK Platform-tools, revision 11
- Stopping ADB server failed (code -1).
- Installed Android SDK Platform-tools, revision 1199%)
- Downloading Documentation for Android SDK, API 15, revision 2
- Installing Documentation for Android SDK, API 15, revision 2
- Installed Documentation for Android SDK, API 15, revision 297%)
- Downloading SDK Platform Android 4.0.3, API 15, revision 3
- Installing SDK Platform Android 4.0.3, API 15, revision 3
- Installed SDK Platform Android 4.0.3, API 15, revision 396%)
- Downloading SDK Platform Android 4.0, API 14, revision 3
- Installing SDK Platform Android 4.0, API 14, revision 3
- Installed SDK Platform Android 4.0, API 14, revision 396%)
- Downloading SDK Platform Android 3.2, API 13, revision 1
- Installing SDK Platform Android 3.2, API 13, revision 1
- Installed SDK Platform Android 3.2, API 13, revision 198%)
- Downloading SDK Platform Android 3.1, API 12, revision 3
- Installing SDK Platform Android 3.1, API 12, revision 3
- Installed SDK Platform Android 3.1, API 12, revision 398%)
- Downloading SDK Platform Android 3.0, API 11, revision 2
- Installing SDK Platform Android 3.0, API 11, revision 2
- Installed SDK Platform Android 3.0, API 11, revision 298%)
- Downloading SDK Platform Android 2.3.3, API 10, revision 2
- Installing SDK Platform Android 2.3.3, API 10, revision 2
- Installed SDK Platform Android 2.3.3, API 10, revision 298%)
- Downloading SDK Platform Android 2.2, API 8, revision 3
- Installing SDK Platform Android 2.2, API 8, revision 3
- Installed SDK Platform Android 2.2, API 8, revision 399%)
- Downloading SDK Platform Android 2.1, API 7, revision 3
- Installing SDK Platform Android 2.1, API 7, revision 3
- Installed SDK Platform Android 2.1, API 7, revision 399%)
- Downloading SDK Platform Android 1.6, API 4, revision 3
- Installing SDK Platform Android 1.6, API 4, revision 3
- Installed SDK Platform Android 1.6, API 4, revision 399%)
- Downloading SDK Platform Android 1.5, API 3, revision 4
- Installing SDK Platform Android 1.5, API 3, revision 4
- Installed SDK Platform Android 1.5, API 3, revision 499%)
- Downloading Samples for SDK API 15, revision 2
- Installing Samples for SDK API 15, revision 2
- Installed Samples for SDK API 15, revision 296%)
- Downloading Samples for SDK API 14, revision 2
- Installing Samples for SDK API 14, revision 2
- Installed Samples for SDK API 14, revision 296%)
- Downloading Samples for SDK API 13, revision 1
- Installing Samples for SDK API 13, revision 1
- Installed Samples for SDK API 13, revision 195%)
- Downloading Samples for SDK API 12, revision 1
- Installing Samples for SDK API 12, revision 1
- Installed Samples for SDK API 12, revision 195%)
- Downloading Samples for SDK API 11, revision 1
- Installing Samples for SDK API 11, revision 1
- Installed Samples for SDK API 11, revision 195%)
- Downloading Samples for SDK API 10, revision 1
- Installing Samples for SDK API 10, revision 1
- Installed Samples for SDK API 10, revision 195%)
- Downloading Samples for SDK API 8, revision 1
- Installing Samples for SDK API 8, revision 1
- Installed Samples for SDK API 8, revision 196%)
- Downloading Samples for SDK API 7, revision 1
- Installing Samples for SDK API 7, revision 1
- Installed Samples for SDK API 7, revision 196%)
- Downloading Android Support, revision 8
- Installing Android Support, revision 8
- Installed Android Support, revision 891%)
- Downloading Google AdMob Ads SDK, revision 6
- Installing Google AdMob Ads SDK, revision 6
- Installed Google AdMob Ads SDK, revision 694%)
- Downloading Google Analytics SDK, revision 2
- Installing Google Analytics SDK, revision 2
- Installed Google Analytics SDK, revision 292%)
- Downloading Google Play APK Expansion Library, revision 1
- Installing Google Play APK Expansion Library, revision 1
- Installed Google Play APK Expansion Library, revision 178%)
- Downloading Google Play Billing Library, revision 2
- Installing Google Play Billing Library, revision 2
- Installed Google Play Billing Library, revision 284%)
- Downloading Google Play Licensing Library, revision 2
- Installing Google Play Licensing Library, revision 2
- Installed Google Play Licensing Library, revision 272%)
- Downloading Google Web Driver, revision 2
- Installing Google Web Driver, revision 2
- Installed Google Web Driver, revision 299%)
- Downloading Android SDK Tools, revision 19
- Installing Android SDK Tools, revision 19
- Installed Android SDK Tools, revision 1999%)
- Downloading ARM EABI v7a System Image, Android API 15, revision 2
- Installing ARM EABI v7a System Image, Android API 15, revision 2
- Installed ARM EABI v7a System Image, Android API 15, revision 299%)
- Downloading Intel x86 Atom System Image, Android API 15, revision 1
- ………(下面省略)………
上面更新的過程中一些特殊的SDK是需要用戶名和密碼的,如:摩托羅拉和HTC。
我們到這些官網注冊一下即可,摩托羅拉和HTC的網址:
注冊官網:http://htcdev.com/ 這個是HTC的;具體的注冊過程我就不多說了,要是看不懂的大家直接在線翻譯一下就可以了
另外一個:https://developer.motorola.com/ 這個是MOTO的,也是一樣的需要注冊一下,方法同上面的HTC的一樣。