x


Before updating to Windows 10 you may need to return your Pro license. More information here

Exception while building for Android

1) What happened When trying to build for Android the Editor throws the following Exception: - starting compile Library/ScriptAssemblies/Assembly-CSharp.dll, for buildtarget 13

 *** Cancelled 'Build.Player.AndroidPlayer' in 9 seconds
 
 Exception: Error building Player: Win32Exception: ApplicationName='java.exe', CommandLine='-Dcom.android.sdkmanager.toolsdir="C:/Program Files (x86)/Android/android-sdk\tools" -classpath "C:/Program Files (x86)/Android/android-sdk\tools\lib\sdkmanager.jar" com.android.sdkmanager.Main list targets', CurrentDirectory=''
   at UnityEditor.BuildPlayerWindow.BuildPlayerWithDefaultSettings (Boolean askForBuildLocation, BuildOptions forceOptions) [0x00191] in C:\BuildAgent\work\842f9557127e852\Editor\Mono\BuildPlayerWindow.cs:367 
 

This always happens to me regardless of the project. Even an empty project with a scene containing only a cube. I suspect there is something wrong with my Java/AndroidSDK setup, but don't know what.

My guess was that the Editor calls java with the above command line to get a list of available targets. So I did that manually from the command line and that works without an Exception.

I am on Windows7 with the latest AndroidSDK and JDK. Unity3.4

more ▼

asked Aug 02, 2011 at 11:59 AM

avatar image

StephanK
6.6k 119 110 171

(comments are locked)
10|3000 characters needed characters left

1 answer: sort voted first

I got the same kind of errors a fews day back trying a fresh install. For me it was the fact that I had Java 64bit installed. As soon as I switched to 32bit I was in the clear..

more ▼

answered Aug 02, 2011 at 12:01 PM

avatar image

ThomasQ
226 104 80 88

Thanks, I'll try that.

Aug 02, 2011 at 12:19 PM StephanK

That was indeed my problem. Thanks again.

Aug 02, 2011 at 12:37 PM StephanK

No Prob. Too bad that Unity Android doesn't work with Java64..

Aug 02, 2011 at 12:39 PM ThomasQ
(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x6298
x369

asked: Aug 02, 2011 at 11:59 AM

Seen: 3072 times

Last Updated: Aug 02, 2011 at 12:39 PM