1 min read

Building Android source code on Ubuntu 10.04+

Fortunately or unfortunately I faced a lot of problems while building Android 4.0.3 on Ubuntu 12.04 LTS. I searched a bit about the same because Android officially supports two platforms for building source code: Linux and Mac. But the thing is that Google supports LTS versions and since the last LTS version of Ubuntu i.e. 10.04 a lot of changes have been made which leads to building failures.

I had to solve these errors by manually changing some of the files and removing some of the constraints from various .mk files. But then I realized that most of the errors are due to GCC compatibility. So while executing the make command I passed which version to be used for making like

make CC=gcc-4.4 CXX=g++-4.4

And I didn’t get any of the errors that I used to get when I used to execute just make.

Hope this will help you Android developers :).