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

Advertisements

7 thoughts on “Mac OS X に Android SDK を入れてみた。

  1. Pingback: ilzzang's me2DAY
  2. Ones in a row with hints awfully dexterous in my opinion.
    Thank you vastly a good deal before hand. Your information on this theme is
    fantastic, I’m happy in which this is observe.
    Thanks a lot all over again!

  3. We are a bunch of volunteers and starting a new scheme in our community.
    Your website offered us with helpful info to work on. You have done an impressive task and
    our whole neighborhood shall be thankful to you.

  4. It’s genuinely very complex in this full of activity life to
    listen news on TV, therefore I just use internet for that reason, and get the latest news.

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 )

Google+ photo

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

Connecting to %s