Search Unity

Unity freezes when Try to locate Android SDK

Discussion in 'Android' started by Vancete, May 14, 2011.

  1. Vancete

    Vancete

    Joined:
    May 3, 2010
    Posts:
    198
    I have update all packages of Android SDK, and now, when I try to do a build, or build&run, Unity freezes completely on "Detecting Android SDK", I have selected the root manually but doesnt work... :-|
     
  2. Falin

    Falin

    Joined:
    Sep 29, 2009
    Posts:
    242
    if you are on windows delete the Android 1.x API's from the SDK
     
  3. Vancete

    Vancete

    Joined:
    May 3, 2010
    Posts:
    198
    Deleting only Android 1.X APIs doesnt working, deleting Android 3.X APIs works perfectly, thanks :D
     
  4. orion_uk

    orion_uk

    Joined:
    Aug 25, 2010
    Posts:
    7
    You on windows right!

    After you choose build and run, open task manager and END TASK for JAVA.EXE.. then unity will continue to build you APK just fine ;)
     
    PersianKiller and mastercpj1 like this.
  5. morty346

    morty346

    Joined:
    Dec 16, 2010
    Posts:
    18
    Same issue I deleted 1.x and no resolution, it started after I included 3.1 - A solution to delete it is not a solution... I need it for HARDWARE APIS!

    UNITY PLEASE FIX

    the killing of java.exe is a workaround for now
     
  6. jorge-castro

    jorge-castro

    Joined:
    Jul 26, 2008
    Posts:
    142
    delete 1.x and 3.x
     
  7. _Petroz

    _Petroz

    Joined:
    May 13, 2010
    Posts:
    730
    I encountered this problem too. Ending the java.exe process which seems to make it work but it's not very nice. I'm going to try removing 1.x and 3.x when i get home.
     
  8. pezz

    pezz

    Joined:
    Apr 29, 2011
    Posts:
    606
    i had this problem. Fixed it by connecting my android phone each time i want to build.
     
  9. jorsalsa

    jorsalsa

    Joined:
    Aug 25, 2010
    Posts:
    8
    Unity team,
    Please help here. I have been seeing in many threads without a direct answer from the Unity team. I am having the same problem. I have Window 7 64.

    I have the entire development environment for Eclipse Android SDK installed and it is working fine for projects created in Java. I can create Android projects and they work perfectly on the emulator and on the phone. So, it is not the java.exe, it is not the SDK, it is not the AVD Manager, it is not Eclipse. I have all packages installed, up to SDK 3.1.

    But if I try to build an android project from Unity (v 3.3.0f4) (no scripts, no funcy objects, just a cube and the camera) I get first the request for the sdk directory. Once I browse it, it continues and stays there trying to find it. I followed some threads recommending killing java.exe ...and nothing happens. I get these 2 errors:

    1. "Available Android targets: ...." with the entire list of id targets on the system.
    2. "Android SDK does not include any platforms! Did you run Android SDK setup to install the platform(s)?
    Minimum platform required for build is Android 2.3 (API level 9)"

    This is clearly a huge bug in Unity, and unfortunately no one from the Unity team has responded with a clear solution.
    Please someone help here.

    Thanks
    Albert
     
  10. jorsalsa

    jorsalsa

    Joined:
    Aug 25, 2010
    Posts:
    8
    As a follow up on my previous thread here is the complete error text for the second error:

    "Android SDK does not include any platforms! Did you run Android SDK setup to install the platform(s)?
    Minimum platform required for build is Android 2.3 (API level 9)

    UnityEngine.Debug:LogError(Object)
    PostProcessAndroidPlayer:prepareToolPaths(String) (at C:/BuildAgent/work/6bc5f79e0a4296d6/Editor/Mono/BuildPipeline/PostProcessAndroidPlayer.cs:56)
    PostProcessAndroidPlayer:postProcess(BuildTarget, String, String, String, String, String, String, BuildOptions) (at C:/BuildAgent/work/6bc5f79e0a4296d6/Editor/Mono/BuildPipeline/PostProcessAndroidPlayer.cs:107)
    UnityEditor.HostView:OnGUI()"

    Any help on this puzzling situation is greatly appreciated.
     
  11. _Petroz

    _Petroz

    Joined:
    May 13, 2010
    Posts:
    730
    The bug you are seeing sounds different to the one mentioned in by the OP regarding the hang when locating the Android SDK. If yours is a different bug then I reccomend you start a new thread.

    FYI: I am running Windows 7 64 bit and building and running Android applications fine, so there is probably something wrong with your tool chain.

    Some important details: I am running JDK 32-bit and I deleted 1.x and 3.x from Android Manager. Everything else is pretty standard.
     
  12. De-Panther

    De-Panther

    Joined:
    Dec 27, 2009
    Posts:
    589
    If you are running win 7 64, then you should use the JDK 32bit and delete the 1.x and 3.x from Android Manager.

    I spent a whole night trying to install JDK 64 and all of the Android Manager tools.
    In the end - it worked as it should after I installed the JDK 32 and deleted the 1.x and 3.x
     
  13. Wozik

    Wozik

    Joined:
    Apr 10, 2009
    Posts:
    662
    Well, the latest beta seems to work properly with x64 Java and more than 6 Android APIs installed. But as a workaround, please try to keep less that 6 APIs in the sdk folder.
     
  14. jorsalsa

    jorsalsa

    Joined:
    Aug 25, 2010
    Posts:
    8
    T hanksfor the help. I only deleted 1.x versions, but kept 3.x and it is working great!
     
  15. Nauman Zubair

    Nauman Zubair

    Joined:
    Dec 24, 2012
    Posts:
    1
    I have same problem. I've mac os x (version 10.7.5) and unity 3.5.6f4. I've latest sdk with adt plugins, its working fine in eclipse for android projects but when i try to create Unity project (Android Platform) it crashes during locating android sdk (i am using correct path of sdk). What I am doing wrong please help me. Your help will be highly appreciated.
     
  16. bitter

    bitter

    Unity Technologies

    Joined:
    Jan 11, 2012
    Posts:
    530
    First of all, try upgrading your unity version to 3.5.7 - we did some fixes to the build process in that version. If that doesn't help please file a proper bug report.
     
  17. Umairabdulla

    Umairabdulla

    Joined:
    Jun 29, 2019
    Posts:
    1
    Same prolem i faced for last 2 days. Finally i got solution. In my case unity freezed because i have used network connection (expecially my company proxy network). Once i just turned off my network connection. After that message box prompted with message "Android SDK is outdated" , where i selected "Use Highest installed" ....... so thats it....... freezing problem solved in my case.........
     

    Attached Files:

    John3D likes this.
  18. John3D

    John3D

    Joined:
    Mar 7, 2014
    Posts:
    441
    unity 2020.3.46f1 build and run is stuck at detecting android sdk

    When I disconnected from my VPN the problem was solved!