2013年1月31日 星期四

setup android development environment on ubuntu

1. download Android SDK and eclipse from http://developer.android.com/sdk/index.html#ExistingIDE

2. unzip it.

3. run eclipse

4. Go to: Window -> Preference -> Android
  Make sure that SDK location is correct:


5. Click on "Android SDK Manager"

6. Select those SDK versions that you wish to have. The SDK manager will download them for you.

7. Click on "Android Virtual Device Manager", which is next to Android SDK Manager.

8. Create a AVD of your own by filling the parameters.
[NOTE]: I don't think these parameters have crucial impact on your AVD, just fill them in. But if your CPU is slow, the AVD will be laggy. If this happens, try to reduce the screen size of the AVD. Or, simply buy a new computer, like I did. :)

9. Start your AVD:


10. Create a new Android project:
New -> Android Application Project -> ... (Fill in the names there) ...

11. Then, we will have an issue here:
adt-bundle-linux-x86_64/sdk/platform-tools/aapt: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory "
To fix that, open a terminal and type: sudo apt-get install ia32-libs
see here for more information.

12. Run your program.