Can't build my Android game PLEASE HELP!

Hi guys,

During building my game this error occurred:

Error building Player: CommandInvokationFailure: Failed to recompile android resource files. See the Console for details.
C:\Program Files (x86)\Java\jre7\bin\javac.exe -bootclasspath “C:/Program Files (x86)/Android/android-sdk/platforms/android-20\android.jar” -d “C:\Users\Karim\Documents\New Unity Project 1\Temp\StagingArea\bin\classes” -source 1.6 -target 1.6 -encoding UTF-8 “com\google\android\gms\R.java” “www\kzlab\com\R.java”

stderr[

]
stdout[

This message appears just after “Compiling android resource files.” process. This error also occurred after signing my game and adding app advertising AdMob. Before that the game was built several times normally.

Please help/support in any matter to solve such a problem!! I tried many things without any solutions or results.

Kindly help!!

What happens if you try to run that command on the command line?

What do u mean sqh by command line?

I had the same problem. The solution for me was to locate the “android.jar” file (I did this by searching the file name) I then placed it inside the sdk folder, and that fixed the problem for me.

Hi guys,

I’m running into the exact same issue. What exactly was the fix?

Reda2: Where in the sdk folder did you put the android.jar file?

Hi,

I’m also running into this issue. Does anyone know the solution? (I’m not sure what Reda2 meant by placing it inside the SDK folder).

also have the problem,need help

I eventually resolved this error by installing the 32-bit JRE version (even though I have a 64-bit system).
I found this solution through this link:

Hope this helps.

I had same problem and i managed to solve it:

i uninstalled all Java version and re download again, but not need to download JRE, download JDK instead. Overwise you will have problem or missing javac.exe file (or incorrect version if you download it elsewhere).
Also it is required to add system variables JAVA_HOME to “c:\Program Files\Java\jdk1.8.0_91” (your path) and PATH variable to “c:\Program Files\Java\jdk1.8.0_91\bin” and restart computer. Hope it helps for you also!