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.
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.
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!