MacにAndroidアプリ開発環境構築
基本は公式サイトに従えばいい。
Installing the SDK
Android SDK
- SDKのダウンロード
- http://developer.android.com/sdk/index.html からMac版をダウンロード
- 任意の場所(e.g. ホームディレクトリ)に展開
- PATH を追加。以下を .bashrc なり .zshrc なりに追記
$ export PATH=$PATH:~/android-sdk-macosx/tools:~/android-sdk-macosx/platform-tools - シェルに反映
$ source ~/.bashrc(.zshrc) - SDKパッケージのインストール
Eclipse
http://www.eclipse.org/downloads/ からMac版をダウンロード。[Eclipse IDE for Java Developers] を選べばよい。
その後任意の場所(e.g. /Applications)に展開。
ADT Plugin
- Eclipseを起動
- [Help] -> [Install New Software] を選び、右上にある [Add] ボタンを押下
- [Add Repository] というダイアログが出てくるので [Name:] に "ADT Plugin"、
[Location:] に "https://dl-ssl.google.com/android/eclipse/" と入力して [OK] ボタンを押下 - "Developer Tools" にチェックを入れて [Next>] ボタンを押下
- 再度 [Next>] ボタンを押下
- "I accept the terms of license agreements" を選択して [Finish] ボタンを押下
- 途中 [Security Warning] というダイアログが出るので [OK] を選択
- インストールが終わると再起動を求められるので [Restart Now] を選択
EclipseにAndroid SDKのインストール先設定
- Eclipseを起動
- [Eclipse] -> [環境設定] で [Android] の [SDK Location:] にSDKのパス (e.g. /Users/${USER}/android-sdk-macosx) を入力して [OK] を押下