Why report the version of java jdk error when build android code

1,911 views
Skip to first unread message

wutia...@gmail.com

unread,
May 30, 2015, 11:22:19 AM5/30/15
to android-...@googlegroups.com
HI ,
    I download the android source 5.1.1,
    and install the openjdk-7-jdk,
    and install required packages(Ubuntu 14.04),
    when i use the command 'make' to build the source code ,
    it show the error like below:

============================================
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  java version "1.7.0_79" OpenJDK Runtime Environment (IcedTea 2.5.5) (7u79-2.5.5-0ubuntu1) OpenJDK 64-Bit Server VM (build 24.79-b02, 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.

#### make failed to build some targets (18 seconds) ####

root@ubuntu:~/android_src/my_android_src# java -version
Picked up JAVA_TOOL_OPTIONS: -javaagent:/usr/share/java/jayatanaag.jar
java version "1.7.0_79"
OpenJDK Runtime Environment (IcedTea 2.5.5) (7u79-2.5.5-0ubuntu1)
OpenJDK 64-Bit Server VM (build 24.79-b02, mixed mode)




my system is ubuntu15.04 run under vmware fusion ,and the openjdk version is "1.7.0_79"
somebody know how to handle this problem?

thank you !

 

Morris

unread,
Jun 1, 2015, 12:59:36 PM6/1/15
to android-...@googlegroups.com
You can try to reference the link to remove jayatana first.



wutia...@gmail.com於 2015年5月30日星期六 UTC+8下午11時22分19秒寫道:

Rob Thompson

unread,
Jun 1, 2015, 12:59:46 PM6/1/15
to android-...@googlegroups.com
Hi

Seems you still have old java kicking about

Run this command

sudo apt-get remove jayatana

Restart PC

Try building again you should be good to go

Ramanpreet Singh

unread,
Aug 30, 2016, 2:52:01 PM8/30/16
to Android Building
Hi,

I run the below command 
make clobber

while following this guide

and I am getting below error:-

Checking build tools versions...

************************************************************

You are attempting to build with the incorrect version

of java.

 

Your version is: java version "1.8.0_71".

The correct version is: Java SE 1.6.

 

Please follow the machine setup instructions at

    http://source.android.com/source/download.html

************************************************************

build/core/main.mk:131: *** stop.  Stop.

Blasio Ojenge

unread,
Nov 23, 2016, 10:19:54 PM11/23/16
to Android Building
any one with idea on how to solve this.. 
or if you did solve it  
Ramanpreet Singh you can share with us
 
Reply all
Reply to author
Forward
0 new messages