Failed to compile NME for Android

Ok, so I'm trying to get the original assembly of NME sample files on an Android device.

I can build for platforms like HTML5, Flash, and Windows, but I can't get them on Android. I always get errors that say:

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. Is is currently set to "C:\Program Files (x86)\Java\jre7" 

Good - obvious enough? But I checked, double-checked, restarted, edited the environment variables and made absolutely sure that the JAVA_HOME variable actually points to the JDK.

Any explanation?

+6
source share
1 answer

Well, to answer my own question, I eventually found that in my user account ( C:\Users\James\ ) there is a .hxcpp_config.xml file and it has an XML node that looks like this:

 <set name="JAVA_HOME" value="/SDKs//java_jdk" /> 

I changed it to this:

 <set name="JAVA_HOME" value="C:\Program Files (x86)\Java\jdk1.6.0_29" /> 

And it works!

+12
source

Source: https://habr.com/ru/post/927145/


All Articles