Ubuntu10.04にAndroidアプリ開発環境構築
公式サイトにもあるし他のブログでも散々取り上げられているが自分用にメモ。
ia32-libsのインストール(64bitの場合)
64bitか確認する方法は前回のエントリ参照。
$ sudo apt-get install ia32-libs
JDKのインストール
$ sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
$ sudo apt-get update
$ sudo apt-get install sun-java6-jdk
Eclipse
http://www.eclipse.org/downloads/ からLinux版をダウンロード。[Eclipse IDE for Java Developers] を選べばよい。
その後任意の場所(e.g. ホームディレクトリ)に展開。
Android SDK
- SDKのダウンロード
- http://developer.android.com/sdk/index.html からLinux版をダウンロード
- 任意の場所(e.g. ホームディレクトリ)に展開
- ~/android-sdk-linux-x86/tools を PATH に追加。以下を .bashrc なり .zshrc なりに追記
$ export PATH=$PATH:~/android-sdk-linux_x86/tools - シェルに反映
$ source ~/.bashrc(.zshrc) - SDKパッケージのインストール
- Android SDK and AVD Managerを起動
$ android - [Settings] を選択して "Force https://... sources to be fetched using http://..." にチェックを入れる。必要があればプロキシを設定
- [Available package] を選択して必要なパッケージにチェックを入れ、[Install Selected] を押下
- [Accept All] にチェックを入れて [Install] ボタンを押下
- 完了したら [Close] を押下
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] を選択