"The selected directory is not a valid home for Android SDK" IntelliJ 2017
IntelliJ Idea can't detect the Android-SDK because there is no "Platforms" folder
It can be created by running below commands
List installed and available packages : sdkmanager --list
Install packages : sdkmanager "platforms;android-26"
Then reference the "/usr/local/Caskroom/android-sdk/3859397" it will work
Reference link : https://developer.android.com/studio/command-line/sdkmanager.html