Search Unity

Where is the Android SDK located ?

Discussion in 'Getting Started' started by Frank1000, Apr 23, 2017.

  1. Frank1000

    Frank1000

    Joined:
    Feb 25, 2014
    Posts:
    35
    Hi,
    i wanted to build the Aircraft Propeller scene for Gear VR, but can't find the android sdk its asking for during build process. I was offered Android Studio when checking for the Android SDK online, so i installed it, but seems there is no from Build requested Android SDK in its folders.

    Question, what to do now ?

    Regards,
    Frank

     
  2. Kiwasi

    Kiwasi

    Joined:
    Dec 5, 2013
    Posts:
    16,860
  3. Frank1000

    Frank1000

    Joined:
    Feb 25, 2014
    Posts:
    35
    ok thanks, the list is what i need :)
    I thought i already have installed the Android Studio with SDK bundle,

    question, how can i see if the SDK is installed already ?

    Has it possibly not been the SDK bundle ? I have this :
     
  4. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,147
    By default it's under C:\Users\%Username%\AppData\Local\Android.
     
    idurvesh, stixx and stepan0 like this.
  5. Frank1000

    Frank1000

    Joined:
    Feb 25, 2014
    Posts:
    35
    k cool, the sdk is there. But now giving me a build failure : what to do here ?

     
    JorgeAmVF likes this.
  6. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,147
    What's the console giving for a detailed error message? Chances are you just need to alter the path a little.
     
  7. Frank1000

    Frank1000

    Joined:
    Feb 25, 2014
    Posts:
    35
    this is the error message i get :



    It didn't ask for the android sdk path any more.
    Not sure if i really have the sdk installed or if the existing sdk folders are just place holder or otherwise used.
     
  8. Frank1000

    Frank1000

    Joined:
    Feb 25, 2014
    Posts:
    35
    still giving me error


     
  9. Frank1000

    Frank1000

    Joined:
    Feb 25, 2014
    Posts:
    35
    i have installed Unity5.6 and Android Studio (with SDK) on a new Win10 install and receive the same error message when testing to build the standard scene with the racing car for Android :O

    What can go wrong so stabilely ?

     
  10. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,147
    That's just the error message informing you of the problem. Like it mentions the actual details are in the console.

    console.png
     
  11. Frank1000

    Frank1000

    Joined:
    Feb 25, 2014
    Posts:
    35
    ah ok thanks. Seems my path should be correct, JDK is also installed ... hmp what then can go wrong with it ?

     
    sachy111C likes this.
  12. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,147
    Okay. I finally managed to reproduce the problem you were having. It turns out the latest release of Android Studio comes with a newer SDK (specifically the tools folder of the SDK) than Unity is capable of recognizing. Solving it simply requires replacing the tools folder in the SDK with an older release. I recommend just renaming the old folder.

    http://dl-ssl.google.com/android/repository/tools_r25.2.5-windows.zip
     
    sachy111C, atulshinde, Gianz and 2 others like this.
  13. Frank1000

    Frank1000

    Joined:
    Feb 25, 2014
    Posts:
    35
    wow great now it works ! thank you :)
     
    sachy111C, atulshinde and Gianz like this.
  14. syscrusher

    syscrusher

    Joined:
    Jul 4, 2015
    Posts:
    1,104
    Thanks for posting that the SDK is under ~/AppData/Local. I installed Android Studio in its default location in C:\Program Files\Android, so I never in a million years would have thought the SDK was not somewhere under that hierarchy.
     
    atulshinde likes this.
  15. atulshinde

    atulshinde

    Joined:
    Sep 19, 2017
    Posts:
    1
    Actually i have same problem
    after downloading this ,what to do?
     
  16. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,147
    Like my post says you extract the files over the existing tools folder.
     
    Last edited: Dec 19, 2017
    atulshinde likes this.
  17. MichaelBeh

    MichaelBeh

    Joined:
    Sep 20, 2017
    Posts:
    1
    So do i need to delete the original tools folder?
     
  18. x0r

    x0r

    Joined:
    Jan 29, 2017
    Posts:
    5
    I managed to make it work by

    1. installing Android Studio
    2. starting it
    3. installing the SDK to a path WITHOUT spaces. (i.e. something like C:\Android\SDK) - I guess some part of the SDK got issues with spaces
    4. setting the Android SDK to this path in unity preferences

    Build process runs fine afterwards
     
  19. garryjoshi

    garryjoshi

    Joined:
    Jan 29, 2018
    Posts:
    1
    I got it working fine as well. Thank you so much for the steps bro!
     
    x0r likes this.
  20. saroroot

    saroroot

    Joined:
    Jan 31, 2018
    Posts:
    1
    You can rename it to another folder name. My personal practice is to rename it to format YYYYMMDD_OriginalName (20180131_tools). Please attached photo. Make sure also that you let the Unity3D point to the correct directories for the SDK and JDK. You can set these inside "EDIT>PREFERENCES>EXTERNAL TOOLS".
    scrn_shot.jpg
     
    Aqeel101 likes this.
  21. ArchAngelus

    ArchAngelus

    Joined:
    Jan 29, 2014
    Posts:
    2
    This helped me out big time! I went through a whole day of trying different things from downgrading JDKs & SDKs, uninstalling, reinstalling, to attempting to download SDK packages using sdkmanager (only to run into a slew of problems).

    The only thing that worked for me was finally deciding to bite the bullet and download Android Studio. I didn't even end up having to replace the tools directory. I am using a slightly older JDK though (jdk1.8.0_161). Not sure if that has anything to do with it. One thing I noticed was that Android Studio takes a VERY long time to download & install everything. I would just let it run and go do something else.
     
  22. chetverov

    chetverov

    Joined:
    Mar 7, 2018
    Posts:
    1
    Спасибо!! Это реально помогло.
    Thank you!! It really helped.
     
  23. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    Ryiah likes this.
  24. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,147
    Wish they would issue a better error message. A lot of people are stumbling over this problem.

    By the way this isn't an actual problem with Unity. Android itself is the culprit here. It doesn't support newer than JDK 8.

    https://stackoverflow.com/questions...a-9-for-android-development/47627603#47627603
     
  25. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    Yeah, wasted a ton of time for me. A quick sanity check before attempting to build would be fantastic. Sadly enough, it's actually in the documentation, it's just google sends you to the second page when you search. :(

    Download and install the Java Development Kit (JDK). Unity requires JDK 8 (1.8), 64-bit version.

    https://docs.unity3d.com/Manual/android-GettingStarted.html
     
  26. Lethn

    Lethn

    Joined:
    May 18, 2015
    Posts:
    1,583
    I'm bumping an old thread but I'm trying to experiment with android and I've run into this stupid problem as well, one major problem for me, I downloaded Android Studio and there is no tools folder or any such thing in the local folder. Setting the folder to the standard installation path obviously does nothing either, would appreciate some help on this. I have no idea why they've done things this way and not provided proper instructions, it's very frustrating.

    For the record I'm not doing JDK, but SDK, my only clue is the error messages. It's telling me

     
    Last edited: Jun 1, 2018
  27. Lethn

    Lethn

    Joined:
    May 18, 2015
    Posts:
    1,583
    Just to make sure I'm not being daft, I installed the absolute latest version of Unity, same problem of the engine not detecting the Android Studio folder.

    Edit: Now I feel dumb, two things I've discovered with their damn naming conventions, command line is the 'SDK' so that's the seperate file, then you need to run Android Studio in order to download the latest version of that SDK I think then things should work.

    Oh and yes! IT DID WORK! :D

    Okay just to clarify what I did.

    1. Make sure your Unity version is the latest one.

    2. Download and install then run Android Studio for the first time, you need to download the SDK within Android Studio in order to get the latest version, this will then make the folder in the Local folder that everybody above was talking about.

    Note: The separate command line version they list on the website is out of date and won't work with Unity, maybe there's something you can tweak to make it work but I haven't found out how to mess with that and the other option is working fine for me.

    To make this all work for me I set the build system to internal so I had a nice packed up .APK file that I could put into my android phone. Simply copy and paste that to your phone, use a file manager or something to open it on your phone and then that should install and you will be able to run the project.

    Bloody hell that was a pain but I'm so glad I got that fixed.
     
    Last edited: Jun 1, 2018
    mickeyband likes this.
  28. jessica10berman

    jessica10berman

    Joined:
    Mar 22, 2021
    Posts:
    1
    I was asking for the same but got this one thread with solutions . Thanks a lot buddy.

    Regards
    Jessica Berman
     
  29. Brother_77

    Brother_77

    Joined:
    Feb 8, 2019
    Posts:
    233