Home > Software engineering >  Android platform not found when using intellij, kotlin multiplatform and gradle
Android platform not found when using intellij, kotlin multiplatform and gradle

Time:09-12

I have an issues with intellij where platform 'android-31' is not found when I try to sync the gradle projects in our repo. But the realty annoying thing is all gradle tasks work through the command line and gradle sync works in android studio.

I have tried to reinstall the SDK and intellij, I have also tried using different SDK managers; command line (from homebrew), intellij and the one in android studio.

Environment:

Company Macbook Pro (M1 Pro, macos:12.5.1)
$ANDROID_HOME=/Users/{my_username}/Library/Android/sdk
# {repo_root}/local.properties
sdk.dir=/Users/{my_username}/Library/Android/sdk

Here is the error

Module: ':core' platform 'android-31' not found.

CodePudding user response:

It turns out I needed to download Java 1.8, once that was done IntelliJ recognised the android SDK.

  • Related