utopia-rise / godot-kotlin-jvm

Godot Kotlin JVM Module
MIT License
585 stars 38 forks source link

Confusing error when Android SDK is missing "platforms" folder #494

Closed nicola-sorace closed 10 months ago

nicola-sorace commented 1 year ago

Was getting this error when trying to compile a Godot-Kotlin project: image

Eventually worked out that something was looking for $ANDROID_SDK_ROOT/platforms, which didn't exist on my system. The ANROID_SDK_ROOT environment variable was set, but the platforms folder was empty. I had to install the android-platform package for it to work. Alternatively, un-setting ANDROID_SDK_ROOT also seems to work since I'm not compiling for Android.

Error message could probably be made clearer. Took a lot of effort to track down what the error was.

CedNaru commented 1 year ago

Thanks for the issue. It seems the issue comes from here.

We assume the platforms folder exists if we find the android sdk root. This assumption causes an error later in the code.