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?
-
this answer solved it for me: https://stackoverflow.com/a/47236930/4946843 – vbp13 Feb 26 '21 at 04:28
15 Answers
I had this problem, select SDK folder (NOT SDK->sources or SDK-platforms)

- 1,002
- 13
- 30
-
This is correct. Once the SDK directory is selected you can choose your sdk version in a dropdown menu. – Julian Sievers Aug 18 '14 at 10:45
-
1Worked for me! The directory you select must be the parent of the `platforms` folder. – thatWiseGuy May 30 '20 at 02:45
-
My parent folder of the "platforms" is "qt". And this doesn't work for me... – Liker777 Feb 14 '21 at 15:41
I resolved with the instructions here, http://www.blog.teamguru.in/2018/04/06/selected-directory-is-not-a-valid-home-for-sdk/
- Just close current error window and let run the android studio
- Open the SDK manager as shown below
- Click on Edit SDK location as shown below
- Simply press next button if there is correct location for SDK you want to install there
- Let it be downloaded
- Install platform and SDK tools and
- Enjoy

- 3,660
- 3
- 41
- 66

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

- 827
- 1
- 13
- 18
Try restarting the application. Close all related studio processes, then right click "run as administrator".
You should be fine after this.

- 463
- 3
- 8
-
I also had the problem of "The selected directory is not a valid home for Android SDK", even after I had updated SDK. (I had an eclipse installation already, that was outdated) Once I ran Android Studio with admin rights, I was able to set the Android SDK path to the sdk folder in my eclipse instalation that I updated. – Xilconic May 30 '13 at 20:13
-
Admin rights don't solve this problem. One has to completely uninstall and reinstall Android Studio! – IgorGanapolsky Sep 04 '13 at 16:08
- Close error window
- Go to gradle tab
- select "Gradle settings", wrench icon
- Search for SDK setup
- Select appropriate sdk for your device.
- Next, two times
- Wait for install There is all..

- 41
- 2
None of the other answers work. After the installation, immediately close Android Studio, then start it as administrator. A message might popup asking for the sdk manager location. Ignore it (Close the popup). Go to Tools > SDK Manager and click on the edit button on the right of Android SDK Location. Then click Next, next and you're good to go. Android Studio will let you install the sdk manager.

- 1,819
- 1
- 16
- 21
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.

- 48
- 1
- 6
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

- 18,597
- 1
- 25
- 34
-
android studio works for me, but i have to ask something: what is the last line you've written "7.0 Diamonds, ARM, Multi-catch" ? what does it mean? – android developer May 17 '13 at 11:39
-
these are featurs of Java 7 --> http://www.oracle.com/technetwork/java/javase/jdk7-relnotes-418459.html – OschtärEi May 17 '13 at 11:41
-
android studio can handle code that is intended for java 1.7, and make it work on android ? does it also include switch-case for strings ? – android developer May 17 '13 at 11:42
-
Android doesn't even run Java 7. The latest JDK that is included in android is Java 6! – IgorGanapolsky Sep 04 '13 at 16:01
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.

- 174,939
- 50
- 355
- 478
If like me, a MacOs user which has installed Android Studio on my Mac and if you've tried everything you can think of but was still unable to set the Android SDK directory in Android Studio, follow the next steps (I know the site where I got the bundle is a freeware site but the package is the right one):
1. Download adt-bundle-mac (Android Developer Tools) from [here][1].
2. Unzip the file and browse into the unzipped folder.
3. Copy only the sdk dir to /Users/username/Library/Android
4. Open Android Studio, the error about the SDK folder which is not set will pop up, set the path to the SDK to "/Users/username/Library/Android/sdk".
5. Now Android Studio will accept the path and you're good to go.
I wasted about 2 hours until I fixed it so I hope that by writing this answer I'll save you some 2 hours.

- 5,873
- 18
- 56
- 99
The sdk folder contains the platform-tools folder.
I copied this folder and named it platforms, then it worked for me.

- 376
- 5
- 16
Steps to follow:
- Close Android Studio.
- Restart Android Studio and Give the path of Empty Folder .
- Install Sdk in that folder(Sdk will automatically install and will get configure automatically.)

- 21,981
- 30
- 95
- 142
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.

- 797
- 10
- 18

- 11
- 3
With Android Studio 4.1.2 the easiest thing is to close the project (file / close project). That's how you get to the wizard that automatically sets up the SDK for you.
The default location that it suggests is /Users/stan/Library/Android/sdk
(exactly the same that I was trying to set up manually but AS kept saying it's invalid)

- 2,151
- 1
- 25
- 33