本文撰寫時,SDK的最新版本是3.0,ADT為r10。
需要項目
※目前版本的android SDK下載改成由android ADV Manager 來管理下載,
而不是直接下載SDK。
※請先配置好JDK與Eclipse請參考以下連結
Linux JDK配置。
Linux Sun JDK
Windwos JDK配置。
Linux Eclipse 配置。
Windows Eclipse配置。
android配置項目
a.下載SDK package
b.設定android SDK環境變數
c.安裝ADT
d.利用ADV下載android的SDK與開發工具。
詳細步驟
Step1.下載SDK package
//這個SDK package類含ADV Manager,下載完畢後會使用這個ADV來更新最新的SDK。
Ubuntu中FrieFox下載完後會再home的DownLoad裡。
Step2.解開SDK Package
- tar xzf android-sdk_r10-linux_x86.tgz
Step3.將解開後資料夾移到你習慣的資料夾
//suod mv [原本資料夾] [目的資料夾]
sudo mv [原本SDK資料夾] /opt/androidSDK
Step4.SDK Package 環境變數設定
- sudo gedit /etc/profile
export PATH=${PATH}:<your_sdk_dir>/tools
Step5.Ubuntu 10.4 64bit
在64bit環境要使用32bit的android開發需要執行以下命令
If you are running a 64-bit distribution on your development machine, you need to install the
ia32-libs
package using apt-get:
: - sudo apt-get install ia32-libs
Step6.安裝ADT
- Start Eclipse, then select Help > Install New Software...
- Click Add, in the top-right corner.
- In the Add Repository dialog that appears, enter "ADT Plugin" for the Name and the following URL for the Location:
Note: If you have trouble acquiring the plugin, try using "http" in the Location URL, instead of "https" (https is preferred for security reasons).
Click OK.
- In the Available Software dialog, select the checkbox next to Developer Tools and click Next
- In the next window, you'll see a list of the tools to be downloaded. Click Next
- Read and accept the license agreements, then click Finish.
- When the installation completes, restart Eclipse.
- Eclipse中選Help > Install New Software 以便安裝ADT
- 點擊ADD
- Name 欄中輸入ADT Plugin ,Location欄中輸入 https (如果你https無法使用可以改成http)://dl-ssl.google.com/android/eclipse/
- 接著一直Next到Finish之後重開Eclipse Step7.ADT Configuring (ADT的配置)
- Select Window > Preferences... to open the Preferences panel (Mac OS X: Eclipse > Preferences).
- Select Android from the left panel.
- For the SDK Location in the main panel, click Browse... and locate your downloaded SDK directory.
- Click Apply, then OK.
- From within Eclipse, select Window > Android SDK and AVD Manager.
- On Mac or Linux, open a terminal and navigate to the
tools/
directory in the Android SDK, then execute:android
可以從Eclipse選項中 選 Window > Android SDK and AVD Manager Or 或是直接從android SDK package解壓後所在直接執行 android 執行完出現 選擇你要安專的項目,請參考 http://developer.android.com/sdk/installing.html#which 之後就可以開始來寫個Hello World了哈~ 參考文件 SDK Install 官方文件 ADT install 官方文件
沒有留言:
張貼留言