Platform: Ubuntu 15.04.
During building android 4.4.2_r1/ or phablet, it's stopped by the message:
"You are attempting to build with the incorrect version of java. Your version is: Picked up JAVA_TOOL_OPTIONS: -javaagent:/usr/share/java/jayatanaag.jar . The correct version is: Java SE 1.6." Output:
$ make j 4 ..................................................................................................................................................
Checking build tools versions...
You are attempting to build with the incorrect version of java. Your version is: Picked up JAVA_TOOL_OPTIONS: -javaagent:/usr/share/java/jayatanaag.jar .
The correct version is: Java SE 1.6.
build/core/main.mk:168: *** stop. Stop.
I already remove/ uninstall all the openjdk, but everytime check java version, the output is
$ java -version
Picked up JAVA_TOOL_OPTIONS: -javaagent:/usr/share/java/jayatanaag.jar
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)
If reinstalling the oracle-java6:
sudo apt-get install --reinstall oracle-java6-installer
during the progress, I'm noticed with the message:
"update-binfmts: warning: current package is oracle-java6, but binary format already installed by openjdk-7"
If apply "sudo dpkg --list | grep -i jdk", the output:
:~$ sudo dpkg --list | grep -i jdk
ii oracle-java6-installer 6u45-0~webupd8~8 all Oracle Java(TM) Development Kit (JDK) 6
rc oracle-java7-installer 7u80+7u60arm-0~webupd8~0 all Oracle Java(TM) Development Kit (JDK) 7
I think, may the "binary format already installed by openjdk-7" remain existing be the cause.
So, the question is: how to remove the binary format, which already installed by openjdk-7?