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?

Ashwin N Bhanushali
  • 3,872
  • 5
  • 39
  • 59

4 Answers4

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.

ertemplin
  • 897
  • 9
  • 24
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.

Howell ZHU
  • 27
  • 2
  • 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. – Ashwin N Bhanushali May 22 '12 at 07:58
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.

Graham Borland
  • 60,055
  • 21
  • 138
  • 179
  • I had installed ia32-libs still its shows the same error. How do I add execute permission on those files. – Ashwin N Bhanushali Apr 12 '12 at 13:34
  • 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.Thanks – Ashwin N Bhanushali Apr 12 '12 at 14:07
1

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

ab-samy
  • 11
  • 1