Search Unity

  1. Unity 2020.1 has been released.
    Dismiss Notice
  2. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

android sdk not found

Discussion in 'Android' started by KhmerDude, Feb 13, 2013.

  1. KhmerDude

    KhmerDude

    Joined:
    Oct 18, 2012
    Posts:
    105
    last night I spend 2 hours trying to figure out where is the location of android sdk and finally got it to work but now it not working and it doesn't give me any error message. it doesn't say android sdk not found it just direct me to search for android sdk and which I did but once I did that, the build and run just exit. does anyone have any idea?
     
    youssefmoussaoui1706 likes this.
  2. Ogien

    Ogien

    Joined:
    Nov 21, 2012
    Posts:
    156
    I had the same issue, here is what I found works for me:

    1. Make sure SDK 4.0 is installed even if you are using 2.3 or something just install 4.0 using SDK Manager
    2. Run Unity as Administrator (Right Click -> Run as Administrator)
    3. I find stopping the adb.exe process works,
    4. If you find the first build works but the second fails, try the above, if they fail, restart computer.

    Adam
     
  3. luther

    luther

    Joined:
    May 26, 2013
    Posts:
    2
    I have the same issue, please let me know if you solved it. Since I'm just starting I'll rather give up wit unity and change engine
     
  4. luther

    luther

    Joined:
    May 26, 2013
    Posts:
    2
    I'm working on a intel i5 8gbram windows 7-64bit
    updating status after 20h, this is what I've done:


    -uninstalled unity
    -uninstalled java JDK 32bit and 64bit versions
    -uninstalled all the android sdks
    -uninstalled android studio
    -installed jdk 1.7 32bit(only)
    -installed android sdk 4.0(api14) (in C:\Program Files (x86)\android-windows-sdk)
    -installed unity (in directory: C:\Program Files (x86)\Unity\Editor)

    Result is that nothing changed, while trying to build/run for android, UNITY can't find "android-windows-sdk" directory.

    Please help???!!!
    thanks
     
  5. PawelBodytko

    PawelBodytko

    Joined:
    Feb 17, 2013
    Posts:
    35
    I have exactly the same issue -- UNITY can't find "android-windows-sdk" directory...
     
  6. annaharris

    annaharris

    Joined:
    Apr 5, 2013
    Posts:
    27
    I found same issue. Please share any suggestion to solve this android SDK issue.
     
  7. plus347

    plus347

    Joined:
    May 30, 2013
    Posts:
    3
    This is my solution way; its really simple also. When Unity ask you for "android-sdk" , i showed a directory which is in "USERS".

    " C:\Users\BEEFER\AppData\Local\Android\android-sdk\platforms\android-14 " its also works for my computer. "AppData" is secret folder, be carefull for this issue.

    Adt MUST close while this processing time...
     
    NestorLobato and sanjayovs like this.
  8. annaharris

    annaharris

    Joined:
    Apr 5, 2013
    Posts:
    27
    Thanks Man, for sharing quick solution about SDK issue.
     
  9. likethebossiam

    likethebossiam

    Joined:
    Jun 25, 2016
    Posts:
    1
    I am using Unity 5.3.5.f1 and Android 23. Just C:\Users\'UserName'\AppData\Local\Android\android-sdk\ worked for me. Please note that you MUST replace 'UserName' with your user that has the SDK and Unity installed. I hope this helps anyone with the same problem now!
     
    NaP_14 and gbbishop like this.
  10. acthr33

    acthr33

    Joined:
    Mar 27, 2017
    Posts:
    1
    I'm using 5.6 and I'm getting an error that unity cannot locate sdk path although I navigated to C:\Users\'UserName'\AppData\Local\Android\sdk\ . Can someone tell me the director structure of the sdk folder? A photo of mine is attached. Thanks
     

    Attached Files:

  11. unity_Awu5BtltImCFHw

    unity_Awu5BtltImCFHw

    Joined:
    Aug 28, 2018
    Posts:
    1
    Same here. There's no exe file in the folder. Whenever I try to show sdk in Unity, to show SDK exe, I can not see it.
     
  12. JuliusM

    JuliusM

    Unity Technologies

    Joined:
    Apr 17, 2013
    Posts:
    580
  13. Bibrosko

    Bibrosko

    Joined:
    Aug 23, 2017
    Posts:
    5
    **UPDATE 2018**
    hi, here's how i fixed the problem (maybe it's not the perfectly orthodox way but it worked for me)

    1) install JDK 32 bit ONLY
    2) install Android studio
    3) download the sdk-tools-windows-4333796
    4) keep it in a different folder than the android studio one
    5) open android studio and launch the SDK manager
    6) change the install folder (select the root of the sdk-tools-windows-4333796 you downloaded on step 3)
    7) let android studio update all pakages and tools (i installed eanything but maybe it-s not necessary)
    8) open unity and go to edit/preferences/external tools
    9) set the JDK path to C:\Program Files (x86)\Java\jdk1.8.0_181\
    10) set the SDK path to the root folder used on step 4 C:[your folder]sdk-tools-windows-4333796
    11) done
     
  14. huxley

    huxley

    Joined:
    Apr 27, 2009
    Posts:
    329
    Wow what stupidity! Not only are the command line instructions now out of date, but Google has removed the SDK manager GUI from Android Studio altogether! Who are the ass hats who make these decisions? Don't they realize that there are a suite of tools that are dependent on these things?

    A much easier way to solve this SDK setup is to download the SDK directly from the Android archive and then update the SDK to a version that will work with the current version of Unity (for me it was r28) using the SDK Manager.exe which is at the root of the unzip location

    http://dl.google.com/android/android-sdk_r24.4.1-windows.zip
     
    A_Magician likes this.
  15. ToroidGames

    ToroidGames

    Joined:
    Jul 25, 2017
    Posts:
    8
    Why have you posted a link to r24 yet have quoted r28?
     
  16. MayuriGupta

    MayuriGupta

    Joined:
    Sep 20, 2019
    Posts:
    1
    Consider this solution only if :
    You have android sdk installed already on your system.

    You need to also install sdk module in Unity. For that :
    • Open Unity Hub
    • In "Installs" tab, click on the three dot menu of your version card
    • Click on "Add modules"
    • Select "SDK" under "Android" option
    • Agree and move further(clicking next) with following installation steps (as usually done)
    • Try "Build and Run" again !

    This worked for me atleast.
     
    cyberpanda491 likes this.
  17. emmettbebop

    emmettbebop

    Joined:
    Apr 26, 2018
    Posts:
    2
    To add to unity_-Nhr9kakg87-1w's response. I did that and still had the build error.

    To fix, where they say "Select "SDK" under "Android" option"
    Also click the down arrow next to "Android" and also check the boxes for JDK and NDK.

    For me the boxes were unchecked for some reason.
     
  18. AlexisLeclerc

    AlexisLeclerc

    Joined:
    Nov 3, 2018
    Posts:
    2
    Hi,
    I had the same issue here with Unity2019.2.20f1.
    This video helped me

    Basically it's:
    1. cd Unity/Hub/Editor/*unity_version*/Editor/Data/PlaybackEngine/AndroidPlayer
    2. chmod +x OpenJDK/jre/bin/*
    3. chmod +x OpenJDK/bin/*
    4. Download Android SDK "Command line tools only" for Linux from developer.android.com/studio, and extract it to Unity/Hub/Editor/*unity_version*/Editor/Data/PlaybackEngine/AndroidPlayer/SDK
    5. chmod +x SDK/*
    6. chmod +x NDK/*
    I needed to do an extra step, because I had an issue also with the NDK not being found.
    In the edit/preferences/external tools set manually the NDK path to /home/<you>/Unity/Hub/Editor/<version>/Editor/Data/PlaybackEngines/AndroidPlayer/NDK/android-ndk-r16b (by default it's only .../NDK !)
     
  19. atulpateltmspl

    atulpateltmspl

    Joined:
    Feb 3, 2020
    Posts:
    4
    Open Android Studio > Sdk Manager
    Please untick checkbox Hide Obsulate Packages

    ==>SDKTools ==> Androis Sdk Tools(obsulate) Ticked CheckBox after install
     

    Attached Files:

  20. manuelurias

    manuelurias

    Joined:
    Mar 2, 2020
    Posts:
    1
    Excellent, thanks

    thanks this works for me.
     
    atulpateltmspl likes this.
  21. KimJammer

    KimJammer

    Joined:
    Jan 18, 2020
    Posts:
    1
    Works for me too, Thanks a bunch
     
    atulpateltmspl likes this.
  22. A_Magician

    A_Magician

    Joined:
    Jan 11, 2020
    Posts:
    1
    This solved my problem, I had installed SDKs correctly through Android Studio and the command line - nothing worked! I spent an entire day investigating this.

    Downloading this SDK manager and installing the latest Android version finally let Unity detect the SDK.
     
  23. shanpjose

    shanpjose

    Joined:
    Mar 28, 2020
    Posts:
    1
    Man you are a STAR.
    I was going mad installing and uninstalling Unity, Android Studio and Java.
    Such an easy fix.
    Thanks a ton bro.
     
    atulpateltmspl likes this.
  24. rogodoy

    rogodoy

    Joined:
    Jan 24, 2013
    Posts:
    8
    Download this pack: http://dl.google.com/android/android-sdk_r24.4.1-windows.zip [ The same
    huxley said]


    It is old version, but it will work fine. Install this pack to a new folder.
    If you has windows: change the variables in system : by setting ANDROID_HOME to $HOME/Android/Sdk
    after change the system variables.
    Go to Unity preference> start Build your project, use the adress you installed the android pack. If a window appear, asking for update to r26 or higher click Update. The files will be update to a higher version.
    There is a another way is updating manually using a higher versions like r26. I believe this happen because we use Unity older versions.
    If you have installed this r24 version, just update it will fixed the problem.
    I just was going crazy, this tread help me a lot to find this solution. I always had problems if android Studio.They change a lot the software. But is fine we get working now.Thank you,
     
    cy118 likes this.
  25. KuKulKanz

    KuKulKanz

    Joined:
    Jun 12, 2018
    Posts:
    1
    It works perfectly now for me. . .Thanks for saving my life.
     
    atulpateltmspl likes this.
  26. vive_creative

    vive_creative

    Joined:
    Mar 22, 2019
    Posts:
    10
    Not quite sure what would be the solution. Unity seems to have tied everything to Hub & Hub is the most corrupt application Unity ever developed. It fails to update, fails to add modules. Why can't the unity connect their android build directly to android studio i wonder?
     
    atulpateltmspl likes this.
unityunity