since: 2013/02/10
update: 2013/02/10A. 新增軟體開發的資料夾 1. 在任意槽新增一個用來放置所有開發軟體的資料夾
ex:
EclipseAndroidDev 2. 在此, 資料夾位置為: C:\Lanli\EclipseAndroidDev
並在 EclipseAndroidDev 下新增
JDK 資料夾.
-------------------------------------------------------------------------------------------B. Java SDK 1. 下載
JAVA SDK: http://www.oracle.com/technetwork/java/javase/downloads/
採用版本: Java SE 7u13 及 Java SE 7 Documentation
2. 預設安裝位置: C:\Program Files\Java\jdk1.7.0_13
3. 將 C:\Program Files\Java\jdk1.7.0_13 下的全部檔案及
jdk-7u11-apidocs.zip(Java文件檔)
copy 到 C:\Lanli\EclipseAndroidDev\
JDK 下
p.s. 至此, 便可以將 JAVA SDK 從控制台中移除.
(可以只保留額外安裝的 JRE C:\Program Files\Java\jre7, 如果有的話)
------------------------------------------------------------------------------------------- C. Eclipse 1. 下載
Eclipse IDE for Java Developers: http://www.eclipse.org/downloads/
採用版本: eclipse-java-juno-SR1-win32-x86_64
2. 解壓縮到 C:\Lanli\EclipseAndroidDev 下(會自動產生
eclipse 資料夾)
-------------------------------------------------------------------------------------------D. Android SDK 1. 下載
Android SDK: http://developer.android.com/sdk/
> DOWNLOAD FOR OTHER PLATFORMS > Windows >
android-sdk_r21.0.1-windows.zip
採用版本: Android SDK r21.0.1
2. 解壓縮 android-sdk_r21.0.1-windows.zip 到 C:\Lanli\EclipseAndroidDev 下
(會自動產生
android-sdk-windows 資料夾)
-------------------------------------------------------------------------------------------E. 新增批次檔: 1. 在 C:\Lanli\EclipseAndroidDev 下新增一個
AndroidDevStart.bat 檔案, 內容如下:
set WORK_HOME=%cd%
set JAVA_HOME=%WORK_HOME%\JDK
set JRE_HOME=%WORK_HOME%\JDK\jre
set ANDROID_SDK_HOME=%WORK_HOME%\android-sdk-windows
set PATH=%JAVA_HOME%\bin;%JRE_HOME\bin;%PATH%
cd eclipse
start eclipse 2.
AndroidDevStart.bat >
傳送到 >
桌面(建立捷徑)-------------------------------------------------------------------------------------------F. 安裝 Android Development Tools (ADT) plugin 1. 點二下 AndroidDevStart.bat 檔案, 開啟 Eclipse
(選擇 workspace, 在此為 C:\Lanli\workspace)
2.
Help >
Install New Software... >
Work with:
https://dl-ssl.google.com/android/eclipse/ > Add >
Name: ADT
Location: https://dl-ssl.google.com/android/eclipse/
> OK
>
Select All (會將 Developer Tools 與 NDK Plugins 全選)
> Next > Next
> 勾選: I accept the terms of the license agreements
> Finish (開始下載並安裝)
> Security Warning > OK
> Restart Eclipse > Yes
3. Eclipse 重開後,
a. 先關閉出現的警告(按 Close)
b. 與取消安裝新的 Android SDK(按 Cancel)
(之後會再自行設定)
-------------------------------------------------------------------------------------------G. Android SDK Setting 1. 開啟 Eclipse
2.
Window >
Preferences >
Android >
SDK Location: Browse...
C:\Lanli\EclipseAndroidDev\android-sdk-windows
> OK
> Close
-------------------------------------------------------------------------------------------H. Android SDK Manager 1. 開啟 Eclipse
2.
Window >
Android SDK Manager 3. 可以勾選所有的項目, 在此勾選:
Tools,
Android 2.2,
Android 4.2 與
Extras > 按下 "Install xx packages..."
> Accept All
> Install
(開始下載並安裝)
> 完成後, 關閉 Eclipse
-------------------------------------------------------------------------------------------I. Android Virtual Device (AVD) Setting 1. 開啟 Eclipse
2.
Window >
Android Virtual Device Manager > New
> AVD Name: AVD-2.2-480x800
Device: 4.0" WVGA(480x800:hdpi)
Target: Android 2.2 - API Level 8
取消勾選: Hardware keyboard present
Display a skin with hardware controls
SD Card: size: 16 MiB
> OK
> Start > Lanuch (啟動)
-------------------------------------------------------------------------------------------J. UTF-8 Setting 1.
Window >
Preferences >
General >
Workspace 2.
Text file encoding: Other:
UTF-8 > OK
------------------------------------------------------------------------------------------- K. 備註: 當更改整個 EclipseAndroidDev 資料夾位置時, 須再次檢查 Eclipse:
1.
Window >
Preference >
Android >
SDK Location:
2.
Window >
Preferences >
Java >
Install JREs: