Win32 exception while bulding for Android using Unity Ads plugin

While trying to use the unity ads plugin deploying to android I get the following error: Error building Player: Win32Exception: ApplicationName=‘C:\Program Files (x86)\Java\jre6\bin\javac.exe’, CommandLine=‘-bootclasspath “C:/androidsdk/adt-bundle-windows-x86_64-20131030/sdk/platforms/android-19\android.jar” -d “C:\Users\User\Documents\2d\Temp\StagingArea\bin\classes” -source 1.6 -target 1.6 -encoding ascii “com\TheVoicesGames\EndlessShaft\R.java” “com\unity3d\ads\android\R.java”’, CurrentDirectory=‘C:\Users\User\Documents\2d\Temp\StagingArea\gen’ Works fine deploying to Ios if that’s relevant

It seems that you are trying to build the game without Android SDK.

Check this document to help you setup the SDK:

If you already have the Android SDK installed, you can point your Unity to that installation:

(copy-paste from the doc):

Add the Android SDK path to Unity

The first time you build a project for Android (or if Unity later fails to locate the SDK) you will be asked to locate the folder where you installed the Android SDK (you should select the root folder of the SDK installation). The location of the Android SDK can also be changed in the editor by selecting Unity > Preferences from the menu and then clicking on External Tools in the preferences window.