以下是安裝Android SDK的步驟.
安裝環境:
Host OS: Linux (Ubuntu 9.10)
JDK: JDK 6
Eclipse: 3.5 (Galileo)
Android SDK: Android SDK Tools, Revision 4 (Android 2.0.1 Platform)
準備工作:
Android SDK需要JDK 5 或 6, 單是JRE是不足夠的.
首先檢查你的Linux是否已經安裝JDK 5 或 6(Ubuntu Linux是沒有預裝JDK的):
開啟Terminal, 輸入指令:
$javac -version

如果沒有安裝JDK, 輸入以下指令安裝JDK 6:
$ sudo apt-get install sun-java6-jdk
(注意: 你必需擁有系統管理的權限)

[* 如果你的Ubuntu是Ubuntu 10.04 LTS, 參考另一篇文章"在Ubuntu 10.04 LTS上安裝sun-java6-JDK"]
下載 Android SDK:
登入以下網址:
http://developer.android.com/
點擊Download的連結.

選擇需要下載的軟件包: Linux (i386).

點選同意和點擊Download.

安裝Eclipse:
從Ubuntu上面的主菜單點擊 System -> Administration -> Synaptic Package Manager

這個時候, 你需要輸入密碼.
在Quick search鍵入eclipse.
選擇eclipse為Mark for Installation, 再點擊Apply, 然後跟著提示便可以了.

開啟Eclipse:
從Ubuntu上面的主菜單點擊 Applications -> Programming -> Eclipse

確認workspace

安裝Android Development Tools(ADT):
從Eclipse上面的主菜單點擊 Help -> Install New Software...

點擊Available Software Sites to

確認有沒有包括 http://download.eclipse.org/releases/galileo.
如果沒有便Add一個新的:
Name: galileo
Location: http://download.eclipse.org/releases/galileo

再Add https://dl-ssl.google.com/android/eclipse/
Name: Android Development Tools
Location: https://dl-ssl.google.com/android/eclipse/

再點擊OK

在Work with項選擇Android Development Tools, 等一下... 點選Developer Tools, 再點擊Next.

再點擊Next.

點選Accept the terms..., 再點擊Finish

等等等...

點選OK, 接受Security Warning.

重新啟動Eclipse.
安裝Android SDK:
從Eclipse上面的主菜單點擊 Window->Preference

瀏覽到Android SDK所在的文件夾, 點擊Apply, OK.

安裝Packages:
從Eclipse上面的主菜單點擊 Window->Android SDK and AVD Manager

選擇左邊的Available Packages, 再選擇右邊所有項目(不花錢的), 點擊Install Selected.

點選Accept All, 點擊 Install Accepted.

重新啟動Eclipse.
創建 AVD:
從Eclipse上面的主菜單點擊 Window->Android SDK and AVD Manager

點擊New
輸入適當的選項, 點擊Create AVD.


整個安裝步驟完成了!
沒有留言:
發佈留言