I have my Android SDK and Java SDK up to date (and on another computer) both running Windows 7 x64 and when select to build or build and run, "Trying to locate Android SDK installation folder..." appears and hangs. However, if I force close java.exe in the Task manager, the prompt clears and Unity and continues to build/runs the .apk just fine.
Could this be a bug or is this a known problem?
-Running Unity3D 3.3.04f
I'm also running Win7 Home 64 and this worked for me.
I’m having this same problem. The java.exe process starts right when the “Trying to locate Android SDK installation folder…” message appears, and force closing the process via Task Manager immediately fixes it. I hope a solution is forthcoming, since it’s kind of annoying.
I’m also running Win 7 (Home) 64-bit.
<p>I had the same error message.. Then I redownloaded the SDK, with All available platforms. I put it on my d: drive (don't know if that had anything to do with it though), and since then it works fine!</p>
Did some testing and it chokes if there are in spaces in the path to the Android SDK. Default location is in Program Files or Program Files(x86). If it’s installed anywhere without a space like c:/Android it works without having to kill java.exe
This didn't work for me. I had the same problem even if I moved the folder to c:/android-sdk :(
That would break the Path environment variable and Start menu shortcuts. Just copy it there instead of moving it and remember to update the preferences in Unity to point to the new location so when it does the java call that seems to be causing the issue it works.
Addendum, if you have UAC turned on you'll need to reinstall the Android SDK to a path with no spaces someplace you don't need administrative privileges to access so the package manager has no problems either instead of just copying the folder.
I have created a game with unity3d v3.3 . but cannot built with android :
Exception: Error building Player: Win32Exception: ApplicationName=‘java.exe’, CommandLine=‘-Dcom.android.sdkmanager.toolsdir=“C:/Users/Admin/AppData/Local/Android/android-sdk ools” -classpath “C:/Users/Admin/AppData/Local/Android/android-sdk ools\lib\sdkmanager.jar” com.android.sdkmanager.Main list targets’, CurrentDirectory=‘’
UnityEditor.BuildPlayerWindow.BuildPlayerWithDefaultSettings (Boolean askForBuildLocation, BuildOptions forceOptions) (at C:/BuildAgent/work/6bc5f79e0a4296d6/Editor/Mono/BuildPlayerWindow.cs:341)
UnityEditor.BuildPlayerWindow.BuildPlayerAndRun () (at C:/BuildAgent/work/6bc5f79e0a4296d6/Editor/Mono/BuildPlayerWindow.cs:263)
In Unity 4.2.0 it doesn’t give me any errors, but in 3.4.2 even if the project contains just the main camera and a cube it gives me these errors and the .apk file is not built. How can I resolve this?
Hello sir! Did you ever manage to solve this issue? for I have the same problem... my project builds for android but not widows phone and this issue is because of the library "using System.Runtime.Serialization.Formatters.Binary". If now resolved I can not save my game. so please if you found a solution let me know.
I'm also running Win7 Home 64 and this worked for me.
– _Petroz