Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android ICS Compilation Issue

I successfully Downloaded the source code for Android 4.0.3. But I am unable to compile it on my machine.

My Machine configuration is UBUNTU 11.10 64 bit,4 GB RAM

When I am running the lunch command getting the following error.

/bin/bash: prebuilt/linux-x86/toolchain/arm-linux-androideabi-4.4.x/bin/arm-linux-androideabi-gcc: Permission denied
/bin/bash: prebuilt/linux-x86/toolchain/arm-linux-androideabi-4.4.x/bin/arm-linux-androideabi-gcc: Permission denied
/bin/bash: prebuilt/linux-x86/toolchain/arm-linux-androideabi-4.4.x/bin/arm-linux-androideabi-gcc: Permission denied
/bin/bash: build/core/find-jdk-tools-jar.sh: Permission denied
build/core/config.mk:268: *** Error: could not find jdk tools.jar, please install JDK6, which you can download from java.sun.com.  Stop.

** Don't have a product spec for: 'full'
** Do you have the right repo manifest?

JDK is already in a path.When I Run the Command java -version I am getting following OutPut

java version "1.6.0_26"
Java(TM) SE Runtime Environment (build 1.6.0_26-b03)
Java HotSpot(TM) 64-Bit Server VM (build 20.1-b02, mixed mode)

Can Anyone Help to proceed?

like image 517
Ashwin N Bhanushali Avatar asked Apr 12 '12 13:04

Ashwin N Bhanushali


4 Answers

If you check the script build/core/find-jdk-tools-jar.sh, you can see that it first checks an environment variable called ANDROID_JAVA_HOME. If you set the ANDROID_JAVA_HOME environment variable to your JDK path, it should fix this error.

like image 118
ertemplin Avatar answered Oct 20 '22 00:10

ertemplin


You are trying to run 32-bit binaries (the NDK toolchain) on a 64-bit OS, so first make sure you have the 32-bit compatibility libs installed:

sudo apt-get install ia32-libs

If that doesn't solve it, then make sure you do have execute permission on those files.

like image 41
Graham Borland Avatar answered Oct 20 '22 01:10

Graham Borland


This is caused by build/core/find-jdk-tools-jar.sh with wrong result for "which javac".

Usually, this is caused by javac is not configured as a alternative for system. So there is no link of /usr/bin/javac for your javac.

Please setup the alternative for javac: $sudo update-alternatives --install "/usr/bin/javac" "javac" "/usr/lib/jvm/jdk1.6.0_32/bin/javac" 1

note: the installed directory of javac for me is "/usr/lib/jvm/jdk1.6.0_32/", you can change it by your configuration.

like image 38
Howell ZHU Avatar answered Oct 19 '22 23:10

Howell ZHU


-Open terminal -type: chmod 777 WORKING_DIR -R -this will fix the error

like image 28
ab-samy Avatar answered Oct 20 '22 01:10

ab-samy