-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Gradle configuration fails with message "Could not initialize class org.jetbrains.compose.experimental.internal.ConfigureNativeCompilerCachingKt" #3748
Comments
I reproduced the issue in you project. I think it has something to do with the way how plugins get appliied. I changed your setup a bit according to the official templates (disabled android though, but it should be possible to follow the approach):
And the error was gone. It's better to follow this template: https://github.com/JetBrains/compose-multiplatform-template#readme |
It's important to declare the plugins in the root build.gradle.kts: plugins {
// this is necessary to avoid the plugins to be loaded multiple times
// in each subproject's classloader
kotlin("multiplatform").apply(false)
id("com.android.application").apply(false)
id("com.android.library").apply(false)
id("org.jetbrains.compose").apply(false)
} |
Thanks @eymar. I tried following the steps and I can confirm it works, I've even enabled Android module using the same approach |
Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks. |
Describe the bug
Doing a gradle sync or even running a simple task like
gradlew clean
from IDE or command line fails with the message:Stacktrace:
Versions
To Reproduce
Clone this branch https://github.com/mr3y-the-programmer/Ludi/tree/migrate_to_kmp, and do a gradle sync or run any gradle task, gradle configuration would fail.
Expected behavior
The project's gradle configuration should complete successfully.
Additional context
Sometimes, there is an additional line that appears randomly between attempts in the error message:
And idea.log file content:
The text was updated successfully, but these errors were encountered: