A hint for when you are setting up the Android SDK on IntelliJ IDEA

​When trying to set up an Android SDK, you might be presented with the following error:
"the selected directory is not a valid home for sdk"

Just make sure that you are running IntelliJ as an Administrator.

The other thing to check for is if one of the folders in the path is hidden, which can happen if you selected to only install the Android SDK for the current user. Just unhide the folder. (A Windows specific issue)

This might also be applicable to Android Studio, I'm not sure.

There ya go :)