Kotlin / kotlinconf-spinner

Apache License 2.0
628 stars 73 forks source link

Gradle failure in Android Studio: KonanLibrary_Decorated cannot be cast to KonanBuildingConfig #26

Open J-Rojas opened 6 years ago

J-Rojas commented 6 years ago

When loading the project into Android Studio, the build fails to compile the clients/android project.

I'm using Kotlin Gradle plugin v1.2.21.

Error:Project evaluation failed including an error in afterEvaluate {}. Run with --stacktrace for details of the afterEvaluate {} error.

FAILURE: Build failed with an exception.

* Where:
Build file '/Users/jrojas/work/JetBrains/kotlinconf-spinner/kotlin-
native/samples/fullstack/clients/android/build.gradle' line: 55

* What went wrong:
A problem occurred evaluating project ':clients:android'.
> org.jetbrains.kotlin.gradle.plugin.KonanLibrary_Decorated cannot be cast to org.jetbrains.kotlin.gradle.plugin.KonanBuildingConfig

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 1s
anaredmond commented 6 years ago

Same issue trying to build kotlinconf-spinner app

ilmat192 commented 6 years ago

This is an known issue related to Gradle's configuration on demand option. Try to disable this option in Android Studio: Preferences -> Build, Execution, Deployment -> Compiler -> Configure on demand.

Masato70 commented 2 years ago

a