I am trying to perform a clean installation of the latest Android SDK and IntelliJ 2017 CE.
I have done things in this order:
- Install IntelliJ 2017 CE
- Install JDK 1.8.x
- Install Android SDK using latest homebrew instructions
- Set JDK location in IntelliJ
- Attempt to set Android SDK location in IntelliJ.
The last step gives me the error mentioned in the title. The SDK is located at
/usr/local/share/android-sdk which is a symlink to
/usr/local/Caskroom/android-sdk/3859397. This SDK folder contains these files:
I have searched extensively for a solution, including other questions on SO. Here is a rough list of things I have tried:
chowned the SDK folder (and symlink) as my local user and also as root
- Ran IntelliJ as root and tried to add Android SDK
- Tried adding both the symlink and destination directory as the SDK directory
android-sdkvia homebrew multiple times, restarting IntelliJ, restarting my computer
Even though there are seemingly identical questions here on SO, none of them seem to address my situation (2017 Android SDK and IntelliJ, Mac OS).
I would like to avoid giving up on the homebrew Android SDK installation, and resorting to a manual SDK installation, as it seems like it would just give me the exact same files, placed in a different location. I would also like to avoid installing Android Studio in parallel with my IntelliJ installation (kind of like using a sledgehammer to solve the problem).
Thank you for any help. I am not trying to do anything fancy – I just want a basic setup for developing Android apps using IntelliJ.
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 :
Install packages :
Then reference the “/usr/local/Caskroom/android-sdk/3859397” it will work
Reference link : https://developer.android.com/studio/command-line/sdkmanager.html
I have found this article helpful.
At this point you can add the Android SDK to your platform settings in IntelliJ. Before that, you need to create the “Platforms” folder, otherwise IntelliJ can’t detect the Android SDK and will throw “The selected directory is not a valid home for Android SDK” error message.
and install it by running
$ sdkmanager “platforms;android-“