The selected directory is not a valid home for Android SDK

Answered

"The selected directory is not a valid home for Android SDK" is a completely useless error message.

It doesn't tell me anything other than that IDEA doesn't like where I have put the Android SDK, but there is no indication of why.

I have Googled it and got 3 possible answers

Apparently it doesn't like spaces in the directory name, but there are none. I changed it to remove a dash as well, but that didn't help.

Another possible fix is to make sure the directory is writeable, but that didn't help.

Lastly is the suggestion that the directory should not be a platform directory. I've not done any Android development, I'm learning from scratch and this means nothing to me.

Does anyone have any idea what I need to do to fix this?

Could IntelliJ replace this with a meaningful error message, or at least document what causes this error message, so it is possible to correct the issue when this message is encountered?

0
3 comments

See if https://stackoverflow.com/a/45268592/104891 helps.

When you add a new platform, you specify the root SDK directory, IDE will list the platforms you have installed:

Here is how the directory looks like:

0
Avatar
Permanently deleted user

I see. In this instance "not a valid home for Android SDK" means "does not have an Android platform installed".

After running "sdkmanager platform\;android-27" I have now got it setup.

Thanks for the pointer.

0
Avatar
Permanently deleted user

@Neil. Shouldn't it be platforms, instead of platform?

0

Please sign in to leave a comment.