Mac OS X に Android SDK を入れてみた。

前回は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

2 Responses to Mac OS X に Android SDK を入れてみた。

  1. ilzzang May 17, 2010 at 12:47 am

    good ~~~

  2. Pingback: ilzzang's me2DAY

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.