About Me

My photo
PhD Candidate at Purdue University, Computer Science.

Wednesday, February 22, 2012

Starting with Android Ubuntu 11.10

I started exploring Android.
I will show the steps I did to build the development environment on Ubuntu 11.10.
At the beginning I wanted to have the environment ready on my MacBook. Actually that did not go so well. It seems that android development is supported mainly on Linux 64 bits. Otherwise, one will face many problems.
  1. Get your 64 bits linux machine ready. VM should be ok. I am working on Parallels.
  2. Visit the Android Source website (Not the SDK). Don't overlook the steps mentioned there.
  3. If you are using Ubuntu 11.10 then use that for installing JDK-6 :
    $ sudo add-apt-repository ppa:ferramroberto/java 
    $ sudo apt-get update
    $ sudo apt-get install sun-java6-jdk sun-java6-plugin

    Instead of lib32readline5-dev use the following libraries
    $ sudo apt-get install lib32readline6-dev libreadline-gplv2-dev

  4. While building I got an error "fatal error: GL/glx.h: No such file or directory". The fix was to install libgl1-mesa-dev.
    $ sudo apt-get install libgl1-mesa-dev

  5. The build may take up to 2 hours.
  6. When you use eclipse as an IDE. the project will have 3 errors. to fix them remove the missing jar files. Then add some lines to your .classpath file. Later I found a patch doing the same modifications https://groups.google.com/forum/?fromgroups#!topic/android-contrib/wEpciQkEUlA
  7. You should be ready to go and use the emulator.

No comments: