I got the following error while compiling android source code for the first time on Ubuntu 12.04, I have not chenged the source code at all abd suggested command in error "make update-api" didn't help me
repo sync
source build/envsetup.sh
lunch full-eng
make
As the problem is in the java part here is my java installation information. I downloaded jdk-6u39-linux-x64.bin and run it and copy the file into /usr/lib/jvm/jdk1.6.0_39/ and set the this java as the main java application by :
sudo update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/jdk1.6.0_39/bin/java" 1
sudo update-alternatives --install "/usr/bin/javac" "javac" "/usr/lib/jvm/jdk1.6.0_39/bin/javac" 1
sudo update-alternatives --install "/usr/bin/javaws" "javaws" "/usr/lib/jvm/jdk1.6.0_39/bin/javaws" 1
sudo update-alternatives --config java
sudo update-alternatives --config javac
sudo update-alternatives --config javaws
here is the result:
echo $JAVA-HOME
/usr/lib/jvm/jdk1.6.0_39/
java -version
java version "1.6.0_39"
Java(TM) SE Runtime Environment (build 1.6.0_39-b04)
Java HotSpot(TM) 64-Bit Server VM (build 20.14-b01, mixed mode)
javac
javac 1.6.0_39