flutter_native_timezone
flutter_native_timezone copied to clipboard
Module was compiled with an incompatible version of Kotlin on Flutter 2.10.0
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
@pinkfish Any update on this?
Same issue =(
Solved.... I just had to update the kotlin version in android studio.
Tools -> Kotlin -> Configure Kotlin Plugin Updates
@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
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.
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
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()
}