fadedreamz fadedreamz - 10 months ago 49
Java Question

Android build error due to incorrect java version

I am currently trying to build Android just for learning purpose. But I am facing strange error -

You are attempting to build with the incorrect version of java. Your
version is: java version "1.7.0_07". The correct version is: Java SE

my java - version gives me

java version "1.7.0_07" Java(TM) SE Runtime Environment (build
1.7.0_07-b10) Java HotSpot(TM) 64-Bit Server VM (build 23.3-b01, mixed mode)

any Idea what went wrong?

anz anz

Open jdk is not supported for android build. Try using sun jdk instead. You can install sun jdk by these commands:

add-apt-repository "deb http://archive.canonical.com/ lucid partner"
apt-get update
apt-get install sun-java6-jdk

If the above command does not work(fails to download jdk), use the following commands instead:

add-apt-repository ppa:ferramroberto/java
apt-get update
apt-get install sun-java6-jdk