Android Development Environment

From Oh Mad Lab
Jump to navigation Jump to search

Android Development Environment

Installing

  • Add "non-free" to the /etc/apt/sources.list
  • Setup environment for Debian (Squeeze)
aptitude install glibc sun-java6-jdk

NOTE: On 64Bit machines, the ia32-libs package is required as well.

  • Download IDE
  • Installing Eclipse Classic
tar zxfv ./eclipse-SDK-3.6.1-linux-gtk.tar.gz

NOTE: If you get this warning "GCJ has been detected as the current Java virtual machine.", then do the following and ensure "java-6-sun" is selected for both:

update-alternatives --config java
update-alternatives --config javac
  • Download Android SDK
  • Download ADT plugin
    • Run eclipse
    • Click the Help->Install New Software... menu items
    • Click the "Add.." button
    • Type "ADT plugin" for name and "https://dl-ssl.google.com/android/eclipse/" for the location
    • Click the "OK" button
    • After the repository updates, check the "Developer Tools"
    • Click the "Next >" button
    • Click the "Next >" button again
    • Click the "I accept the terms..." option and then click the "Finish" button
    • The plugin will now install and it should show you the installation progress and if it complains about unsigned content, just click OK
    • When done installing, click the "Restart Now" button
  • Setup ADT plugin
    • Change directory into the Android SDK directory from above (remember, the one I said to remember!?!?)
    • Change directory into the tools folder and then run: ./android update sdk
    • Click the "Install" button on the "Choose Packages to Install"
    • Click the "Close" button when done
    • Close the window
    • Back in eclipse, click the Window->Preferences menu items
    • Select "Android"
    • Enter the SDK location from above (remember, the one I said to remember!?!?)
    • Click the "Apply" button
    • Click the "OK" button
    • If this is the first time, then in the background a "Thanks for using the Android SDK" window should have loaded
    • Uncheck "Send usage statistics to Google"
    • Click the "Proceed" button

Troubleshooting

If you run into a problem with the emulator not wanting to run because of:

./emulator: /lib/i686/cmov/libc.so.6: version `GLIBC_2.8' not found (required by ./emulator)
./emulator: /lib/i686/cmov/libc.so.6: version `GLIBC_2.11' not found (required by ./emulator)

Then without getting into details, the fix is to simply downgrade to the previous version of the tools as such:

wget http://dl.google.com/android/repository/tools_r07-linux.zip
cd android-sdk-linux_86
mv tools tools.r08
unzip tools_r07-linux.zip
mv tools_r07-linux/ tools

Remember that when it's officially fixed to, you'll want to switch back

Resources