PDA

View Full Version : packaging issue for android in windows 7



skumar.m226
29 Oct 2012, 8:21 PM
I am trying to package an example application in windows 7 and getting an error.

Could not run ant with error: 1
Failed to package application
[ERROR]
BUILD FAILED
C:\Android\android-sdk\tools\ant\build.xml:679: The following error occurred whi
le executing this line:
C:\Android\android-sdk\tools\ant\build.xml:692: Unable to find a javac compiler;

com.sun.tools.javac.Main is not on the classpath.
Perhaps JAVA_HOME does not point to the JDK.
It is currently set to "C:\Program Files (x86)\Java\jre7"



JDK path is added to path in system properties.

I have attached detailed error log file.

Can anyone help me with this.

39665

svenna
1 Nov 2012, 11:08 PM
You have to set the system variable JAVA_HOME to your jdk directory(not your jre directory).

Right-click the My Computer icon on
your desktop and select Properties.
Click the Advanced tab. Click the
Environment Variables button. Under System Variables, click New.
Enter the variable name as JAVA_HOME.
Enter the variable value as the installation path for the Java Development Kit.
Click OK.
Click Apply Changes.