I’m getting this error when trying to build android, my SDK is up to date and I am able to build it in my Mac… this only happens when trying to build for Windows.
Error building Player: Win32Exception: ApplicationName=‘C:\Program Files (x86)\Java\jre7\bin\javac.exe’, CommandLine=‘-bootclasspath “H:/adt-bundle-windows-x86_64-20140702/sdk/platforms/android-20\android.jar” -d “H:\Unity3D\Project\Temp\StagingArea\bin\classes” -source 1.6 -target 1.6 -encoding UTF-8 “com\domain\Project\R.java” “com\facebook\android\R.java” “com\google\android\gms\R.java” “com\google\example\games\basegameutils\R.java” “com\google\example\games\mainlibproj\R.java”’, CurrentDirectory=‘H:\Unity3D\Project\Temp\StagingArea\gen’
EDITED:
Installed JDK 32bit the got a different error now:
Error building Player: CommandInvokationFailure: Failed to build apk. See the Console for details. C:\Program Files (x86)\Java\jdk1.8.020\bin\java.exe -Xmx1024M -Dcom.android.sdkmanager.toolsdir=“H:/adt-bundle-windows-x8664-20140702/sdk ools” -Dfile.encoding=UTF8 -jar “F:/Program Files (x86)/Unity/Editor/Data/BuildTargetTools/AndroidPlayer\sdktools.jar” -
stderr[ Error: Not a file ‘H:\Unity3D\Project’ ] stdout
Try to compile to later Android level, 1.6....isn't that a really old android version? maybe this old android version doesn't like some of the jars/classes you want to use? Also is you Java 32 or 64bit? If 64bit you may have to change that so it is 32bit :)
– khos85Thanks! I'll try the java 32bit, I think it's not the API level, cause in my Mac is building OK! Thanks again, I'll let you know how it goes
– badjanoDifferent error now: Error building Player: CommandInvokationFailure: Failed to build apk. See the Console for details. C:\Program Files (x86)\Java\jdk1.8.0_20\bin\java.exe -Xmx1024M -Dcom.android.sdkmanager.toolsdir="H:/adt-bundle-windows-x86_64-20140702/sdk\tools" -Dfile.encoding=UTF8 -jar "F:/Program Files (x86)/Unity/Editor/Data/BuildTargetTools/AndroidPlayer\sdktools.jar" - stderr[ Error: Not a file 'H:\Unity3D\Project' ] stdout[ ]
– badjanoWhat exists in the path H:\Unity3d\Project ?
– liortalMy Unity project, actually that's not it, it's a different path but I switched it so it would be easier to understand...
– badjano