update: 2013/11/02
reference:
1. Amazon Mobile App Distribution Program
2. Kindle Fire Development Essentials - Techotopia
3. I touchs: Seting up an Android Development Environment
4. I touchs: Installing the Android SDK on the Mac OS X
5. I touchs: Setting Up the Android Device for Development on Windows7
A. Setting Up Your Development Environment
1. Installing the JDK:
終端機 > $ java -version
java version "1.7.0_45"
(至少需要 JDK 6)
> 下載 JDK: Java SE Downloads
2. Installing the Android SDK and Eclipse IDE:
在此使用 Android SDK bundle: Android SDK | Android Developers
其中已包含了:
Eclipse + ADT plugin
Android SDK Tools
Android Platform-tools
The latest Android platform
The latest Android system image for the emulator
---------------------------------------------------------------------------
目前檔名: adt-bundle-mac-x86_64-20131030.zip
存放位置: /Lanli/RD/sources
安裝:
$ cd /Lanli/RD/IDE/
$ unzip /Lanli/RD/sources/adt-bundle-mac-x86_64-20131030.zip
3. 打開 eclipse:
/Lanli/RD/IDE/adt-bundle-mac-x86_64-20131030/Eclipse.app
4. Installing SDK Add-Ons:
a. ADK > 偏好設定 > Android > SDK Location > OK
> Tools > Manage Add-on Sites...
c. 在 Android SDK Manager 中, 勾選以下的套件:
備註: 如果你傾向於使用實體的 Kindle Fire 平板來測試 app 而不想使用模擬器,
你仍然必須選取其中之一的套件作為 Kindle Fire system images. 每個
Kindle Fire 套件包含用來識別不同的實體 Kindle Fire 平板作為測試與除錯
使用的 Android Debug Bridge (ADB).
Tools:
Android SDK Tools (install the latest version)
Android SDK Platform-tools (install the latest version)
SDK Platform
ARM EABI v7a System Image (emulator prerequisite for ARM system images)
Intel x86 Atom System Image (emulator prerequisite for x86 system images)
Kindle Fire HD 7" (3rd Generation) (ARM and x86 system images for emulator)
Kindle Fire HDX 7" (3rd Generation) (ARM and x86 system images for emulator)
Kindle Fire HDX 8.9" (3rd Generation) (ARM and x86 system images for emulator)
SDK Platform
ARM EABI v7a System Image (emulator prerequisite for ARM system images)
Intel x86 Atom System Image (emulator prerequisite for x86 system images)
Kindle Fire (2nd Generation) (ARM and x86 system images for emulator)
Kindle Fire HD 7" (ARM and x86 system images for emulator)
Kindle Fire HD 8.9" (ARM and x86 system images for emulator)
SDK Platform
Intel x86 Atom System Image (emulator prerequisite for x86 system images)
Kindle Fire (ARM system image for emulator)
Kindle Fire Device Definitions
Kindle Fire USB Driver (not applicable for OS X)
Android Support Library
Intel x86 Emulator Accelerator (HAXM) (emulator prerequisite for x86 system images)
Amazon AVD Launcher
> Choose Packages to Install:
分別選取不同分類的 Packages, 並點選: Accept License
> Install
> 安裝完成後, 關閉 Android SDK Manager.
B. Installing and Running the Amazon AVD Launcher
1. 啟動 Amazon AVD Launcher:
$ cd /Lanli/RD/IDE/adt-bundle-mac-x86_64-20131030/sdk/extras/amazon/AVDLauncherMacOSX
$ ./amazonavd
> 當出現 "SDK path verification" 視窗, 瀏覽到正確的 Android SDK 位置後,
按下 "OK".
2. 在 Amazon AVD Manager 視窗中, 選擇要模擬的設備, 接著按下 "Create AVD".
Keyboard: My computer keyboard
Skin: No skin
> 按下 "OK".
按下 "Start..." 即可啟動.
備註: 之後亦可在: AVD > Window > Android Virtual Device Manager 中啟動 AVD.
----------------------------------------------------------------------
C. Creating Your First Kindle Fire App
1. 開啓 Eclipse > ADT > File > New > Android Application Project:
設定以下項目:
Application Name: HelloKindleFire
Minimum Required SDK: API 10: Android 2.3.3 (最小支援 Kindle Fire 的 API)
Target SDK: API 17: Android 4.2 (至少要 API 15, API 17 為目前支援 Kindle Fire 的最大 API )
Compile SDK: API 17: Android 4.2 (至少要 API 15)
Theme: None
Activity Name: HelloKindleFireActivity
Navigation Type: None
> Finish
沒有留言:
張貼留言
注意:只有此網誌的成員可以留言。