tohuwabohu In technology, chaos reigns supreme.

Fixing a Missing Android Platform in IntelliJ


Recently I tried setting up a simple Android project that contains of nothing more than a Basic Activity suggested by the Android Studio SDK Plugin for IntelliJ. Expecting everything to work out of the box, I was greeted by following error after initiating the gradle build:

Module: ':app' platform 'android-32' not found.

So, there are multiple suggestion on the web but the one I needed was rather simple. First, point IntelliJ to a valid OpenJDK 11 path.

Next, point IntelliJ to a valid Android SDK Path. The SDK will be installed through the project setup, but however this manual step still will be necessary in order for the build to work. Both Android API 33 and 32 showed up as installed in the SDK Manager but apparently that did not matter.

After that, sync the gradle project by clicking Tools > Android > Sync Project with Gradle Files in the menu bar. Interestingly, after a restart of my IDE both Android SDK 33 and 32 showed up under different names in the SDK Manager, but it worked nonetheless.

After the sync finishes, the file structure should change to packaged view automatically:

Then you should be good to go.

Tagged as: android intellij