Android-studio Selected directory is not valid home for Android SDK

后端 未结 14 2580
误落风尘
误落风尘 2021-01-03 21:46

I installed android studio but while selecting android SDK I am getting following error. I tried solution which is on this post but no luck. How can I solve this?

相关标签:
14条回答
  • 2021-01-03 22:23

    Just delete(preferably permanently) all the android directories in whatever location they are present(e.g. C:\Program Files\Android, C:\users\respective user\respective android folders). Remove the installer as well(if possible). Make sure to save all your Android Studio files in some external storage (preferably).

    The main thing is to get Android studio with SDK.

    Now go to the android studio website and install android studio leaving all settings default. There you will also get to install the SDK and it's linking.

    It will take some time to load and will load nearly 1.5 GB files.

    This worked for my case.

    0 讨论(0)
  • 2021-01-03 22:25

    I got the same issue. You must enable the Android Support Plugin Configuration > Plugin > Android Support Plugin. Check it.

    0 讨论(0)
  • 2021-01-03 22:28

    I had this problem on Linux. Apparently you need write access to some place in that directory, so I just took ownership of the entire thing:

    sudo chown -R thomas:thomas /opt/android-sdk
    

    Could be that something similar is going on on Windows as well.

    0 讨论(0)
  • 2021-01-03 22:30

    I had the same problem but what I found is that it requires the parent folder of the following things AVD manager,SDK manager,tools,platform-tools,build-tools etc.So what you need is to find the parent directory of these things, which you might find with a name such as android-sdk or android-sdk-windows(in case you are using windows OS).Make sure the above said contents are in that folder and select it.I hope you will find this useful.

    0 讨论(0)
  • 2021-01-03 22:30

    Download the SDK from http://developer.android.com/sdk/index.html

    Start SDK manager and make everything up to date

    Also, make sure you have set the language level to

    • 7.0 Diamonds, ARM, Multi-catch, etc
    0 讨论(0)
  • 2021-01-03 22:33

    Try restarting the application. Close all related studio processes, then right click "run as administrator".

    You should be fine after this.

    0 讨论(0)
提交回复
热议问题