I switched my computer and loaded up an existing project. I tried to build it but run into the following exception during the build process (at the step where it says compiling assets into a single file or something):
I thought that perhaps I needed to have javac.exe in the path specified so I copied that over from the JDK to that path and ran the build process again. This time, I got a different error:
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:/Development/adt-bundle-windows-x86_64-20140702/sdk/platforms/android-20\android.jar” -d “C:\Users\RajHP\Documents\ActionGame\Temp\StagingArea\bin\classes” -source 1.6 -target 1.6 -encoding UTF-8 “com\unity3d\ads\android\R.java” “com\WaveLightGames\GunFrenzyRelease\R.java”
stderr[
]
stdout[
]
Do not copy your files out to the other folders, it does not help… Try editing the PATH variable in your environments so that Unity knows where the java binaries are. The Android build process is not as simple as just having java compile them into java archive, it requires other java binaries and libraries to complete the entire process (like zipping and signing).
You should remove you’re Java installation and install the latest Java SDK, version 8 .* from the Oracle site as it created my ‘System Variables’ this time on installation without me editing them myself.
You need to open ‘System Properties’->‘Advanced’->‘Environment Variables…’ then edit the ‘System Variables’
e.g.
Variable Name: JAVA_HOME
Variable Value: C:\Program Files\Java\jdk1.8.0_25