Ubuntu 11.04 AMD64はじめました
Android開発環境構築手順を備忘.
sun-java6-jdk
インストール
sudo add-apt-repository 'deb http://archive.canonical.com/ lucid partner' sudo apt-get update sudo apt-get install sun-java6-jdk
デフォルトに設定
sudo update-alternatives --config java
Androidツール
ダウンロード,展開,配置
http://developer.android.com/sdk/index.html
からandroid-sdk_r11-linux_x86.tgzをダウンロード,解凍.
回答したフォルダの中身を~/Android直下に配置.
$ ls ~/Android/ SDK Readme.txt add-ons platforms tools $
って感じ.
パスの設定
.bashrcに以下を追記することで$PATHに~/Android/toolsを追加.
PATH=$PATH:~/Android/tools
端末を再起動→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 '@<name>' or '-avd <name>' to start a given virtual device (see -help-avd for details). Otherwise, follow the instructions in -help-disk-images to start the emulator
上記のようにエミュの設定を特定してないから怒られるメッセージがでればOK
Eclipse
Eclipseをsoftware-centerとかからインストール,起動.
Android SDKプラグインのインストール
Help -> Install New Software -> Add
- Name: 任意(Android-plugin)など
- Location: https://dl-ssl.google.com/android/eclipse/
Developer Toolsにチェック -> Next -> Next -> Accept -> Finish -> インストール開始
- > "Security Warning"をOK -> "Would you like to restart?"をYes -> 再起動
最後に
"adb"がplatform-toolsに移動したらしい
$ cat ~/Android/tools/adb_has_moved.txt The adb tool has moved to platform-tools/ If you don't see this directory in your SDK, launch the SDK and AVD Manager (execute the android tool) and install "Android SDK Platform-tools" Please also update your PATH environment variable to include the platform-tools/ directory, so you can
ので,.bashrcに以下を追記.
PATH=$PATH:~/Android/platform-tools