Skip to content
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

Error "was compiled with a incompatible version of Kotlin. The binary version...." #258

Closed
robertruben98 opened this issue May 16, 2024 · 3 comments

Comments

@robertruben98
Copy link

When i try to run the project this error appears:

home_widget\HomeWidgetProvider.kt: (12, 9): Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.9.0, expected version is 1.7.1.

i try this, but doesn't work

buildscript {
    ext.kotlin_version = '1.9.24'
    repositories {
        google()
        mavenCentral()
    }

    dependencies {
        classpath 'com.android.tools.build:gradle:8.0.0'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
    }
}

can you help me please?

@Oh-Kang94
Copy link

Also, I have a same issue like above. Before, I make the project with this lib, I updated flutter 3.20 to 3.22.0.
Is there anyone solve this issue?

@Dec-QXY
Copy link

Dec-QXY commented May 18, 2024

OMG, I also have the same problem. I set kotlin_version to the latest version and the same problem occurs. The same problem occurs when I set it to 1.9.0.

@Oh-Kang94
Copy link

I found the solution.
This is worked for me!

Please, amend ./android/settings.gradle

plugins {
    id "dev.flutter.flutter-plugin-loader" version "1.0.0"
    id "com.android.application" version "7.3.0" apply false
    id "org.jetbrains.kotlin.android" version "1.9.20" apply false
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants