Android ICS Compilation Issue
Asked Answered
A

4

6

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?

Agnew answered 12/4, 2012 at 13:25 Comment(0)
B
12

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.

Behr answered 29/11, 2012 at 18:8 Comment(1)
Something like this on osx: export ANDROID_JAVA_HOME=$(/usr/libexec/java_home -v 1.7)Pucida
D
2

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.

Dusky answered 20/5, 2012 at 8:16 Comment(1)
Thanks Man.But due to time constraint I moved to ubuntu 10.04. I will check out your answer with ubuntu 11.10 machine and accordingly give you UpVote.Agnew
M
1

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.

Mycorrhiza answered 12/4, 2012 at 13:28 Comment(2)
I had installed ia32-libs still its shows the same error. How do I add execute permission on those files.Agnew
Hi Graham I added the execution permission on file. Now it shows only one error regarding java /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? Can you suggest me some trick how to remove it.ThanksAgnew
A
1

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

Araarab answered 16/7, 2013 at 6:44 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.