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

Module was compiled with an incompatible version of Kotlin on Flutter 2.10.0 #38

Open
jeancc29 opened this issue Feb 7, 2022 · 7 comments

Comments

@jeancc29
Copy link

jeancc29 commented Feb 7, 2022

I'm getting the following error:

C:\flutter.pub-cache\hosted\pub.dartlang.org\flutter_native_timezone-2.0.0\android\src\main\kotlin\com\whelksoft\flutter_native_timezone\FlutterNativeTimezonePlugin.kt: (22, 10): Class 'kotlin.jvm.JvmStatic' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.5.1, expected version is 1.1.15.
The class is loaded from C:/Users/USER/.gradle/caches/transforms-2/files-2.1/0abecf3832c202c9f5aa4402d080189c/jetified-kotlin-stdlib-1.5.31.jar!/kotlin/jvm/JvmStatic.class

@pvsvamsi
Copy link

@pinkfish Any update on this?

@varpa89
Copy link

varpa89 commented Feb 15, 2022

Same issue =(

@jeancc29
Copy link
Author

Solved.... I just had to update the kotlin version in android studio.

Tools -> Kotlin -> Configure Kotlin Plugin Updates

@Billy-80
Copy link

Billy-80 commented Mar 8, 2022

@jeancc29 2 ( tools -> Kotlin -> Configure Kotlin Plugin Updates) which Kotlin version / channel are you using? I have the same error with the Kotlin stable channel / latest version : 211-1.6.10-release-923-AS7442.40

@robjvan
Copy link

robjvan commented Jun 15, 2022

Any updates on this one? Updated to latest Kotlin (stable / 212-1.7.0-release-281-AS5457.46 and still hitting the same issue. This is a really big deal, can't compile the app with this package added.

@robjvan
Copy link

robjvan commented Jun 16, 2022

Any updates on this one? Updated to latest Kotlin (stable / 212-1.7.0-release-281-AS5457.46 and still hitting the same issue. This is a really big deal, can't compile the app with this package added.

Figured it out - The plugin itself needs the Kotlin version updated. There's a PR for the fix, but these steps worked for me while we wait for an update:

Clone package to your project (I created {root}/plugin for this purpose)
Make the following changes to plugin/image_gallery_saver-1.7.1/android/build.gradle:

  • update ext.kotlin.version = 1.7.0

@RishiKar
Copy link

RishiKar commented Oct 6, 2022

Hi @robjvan ,
I am running into similar issues and would like to update the plugin
Will it be sufficient if I update the ext.kotlin_version in .pub-cache/hosted/pub.dartlang.org/flutter_native_timezone-2.0.0/android/build.gradle

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

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

6 participants