前回はWindows環境でAndroid1.5を試してみたが今回はMac OS Xで試してみる。
1. SDKダウンロード
http://developer.android.com/sdk/
Mac OS X(intel)版をダウロードする。解凍したらて適当な場所に保存する
2. Eclipseをダウロードする
http://www.eclipse.org/downloads/
一番に下にある、Eclipse Classice の Mac Cocoa 32bitを選択してダウンロード。
同じく解凍したら適当な場所に保存する。
3. ADT Pluginをインストール。
Eclipse.appを起動して、以下のupdate siteからプラグインをインストール
update site: https://dl-ssl.google.com/android/eclipse/
4. emulatorを起動してみる
$ ./emulator
emulator: ERROR: You did not specify a virtual device name, and the system
directory could not be found.
If you are an Android SDK user, please use ‘@’ or ‘-avd ‘
to start a given virtual device (see -help-avd for details).
Otherwise, follow the instructions in -help-disk-images to start the emulator
$
Virtual Device作成
$ ./android create avd -n dongrikim -t 2
Error: Target id is not valid. Use ‘android list targets’ to get the target ids.
$ ./android list targets
Available Android targets:
なにも出てこない!
調べたところSDK Componentsを入れないと作れないらしい。
Android SDK and AVD ManagerでComponentをインストール

インストール完了したらもう一度
$ ./android list targets
Available Android targets:
id: 1 or “android-3″
Name: Android 1.5
Type: Platform
API level: 3
Revision: 1
Skins: HVGA (default), HVGA-L, HVGA-P, QVGA-L, QVGA-P
id: 2 or “Google Inc.:Google APIs:3″
Name: Google APIs
Type: Add-On
Vendor: Google Inc.
Revision: 3
Description: Android + Google APIs
Based on Android 1.5 (API level 3)
Libraries:
* com.google.android.maps (maps.jar)
API for Google Maps
Skins: QVGA-P, HVGA-L, HVGA (default), QVGA-L, HVGA-P
・・・・・・・・・・・・・・・・・・・・・・・
$
今度は出てきた。
Virtual Device作成
$ ./android create avd -n dongrikim -t 7
Android 2.1 is a basic Android platform.
Do you wish to create a custom hardware profile [no]
Created AVD ‘dongrikim’ based on Android 2.1, with the following hardware config:
hw.lcd.density=160
$
成功したようだ。
avdを指定してemulatorを起動してみる
$ ./emulator -avd dongrikim

Like this:
Be the first to like this post.
good ~~~
Pingback: ilzzang's me2DAY