Unity Admob Error

Hello everyone!

I’m currently making an android app and already posted it one gogle play, and i was hopping to put some adds on it, i’m trying to use Admob with unity and i am going crazy with the error below.

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:/Users/Andre/Desktop/adt-bundle-windows-x86_64-20140702/sdk/platforms/android-21\android.jar” -d “C:\Users\Andre\Desktop\ADDS\googleads-mobile-plugins-master\unity\samples\HelloWorld\Temp\StagingArea\bin\classes” -source 1.6 -target 1.6 -encoding UTF-8 “com\example\admobtest\R.java” “com\google\android\gms\R.java”

Don’t know what else to do, i have a 64 bit machine, have the sdk fully installed, jdk installed,and going crazy for like 4 or 5 days…
if anyone can help, thanks a lot!!

Looks like the error you’re getting is due to the PATH environment variable missing a reference to your JDK.

Check out this tutorial to set it up.

I did this below… can u tell if i’am doing anything wrong please.

Cumps.

1817252--116275--Sem Título.png

You created a new system variable called JAVA_HOME. You still need to add it to the PATH system variable. Do so by adding %JAVA_HOME%; to the beginning of the path.

Also, to see changes to environment variables take effect, you need to log out of your current Windows session (or the current terminal session, for anyone making path changes via terminal) and log back in.

You can test these changes by opening a console window and typing echo %PATH%. You should see a reference to your JDK among the semicolon delineated string of paths.

Sorry, I misunderstood the situation. Looks like you added javac.exe to the existing path for the runtime engine. Don’t modify the System environment variable JAVA_HOME. That is placed there by the Java Runtime Engine when it’s installed.

Instead, create a new User environment variable (not System environment variable) called PATH if it doesn’t already exist, and provide the path to the bin directory (not the javac.exe) found in your Java Development Kit install directory.