============================================
Checking build tools versions...
************************************************************
You are attempting to build with the incorrect version
of java.
Your version is: java version
"1.6.0_45" Java(TM) SE Runtime Environment (build 1.6.0_45-b06)
Java HotSpot(TM) 64-Bit Server VM (build 20.45-b01, mixed mode).
The required version is: "1.7.x"
Please follow the machine setup instructions at
https://source.android.com/source/initializing.html
************************************************************
build/core/main.mk:167: *** stop. Stop.
$ sudo update-alternatives --remove java /usr/lib/jvm/jdk1.6.0_45/bin/java
$ sudo update-alternatives --remove java /usr/lib/jvm/jdk1.6.0_45/bin/javac
$ sudo update-alternatives --remove java /usr/lib/jvm/jdk1.6.0_45/bin/javaws
$ sudo rm -r /usr/lib/jvm/jdk1.6.0_45/