Kotlin / Gradle version issue
Closed this issue · 2 comments
paj-co commented
When run my Flutter app in release mode I got this error:
w: Runtime JAR files in the classpath should have the same version. These files were found in the classpath:
/Users/przemek/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-jdk7/1.3.50/50ad05ea1c2595fb31b800e76db464d08d599af3/kotlin-stdlib-jdk7-1.3.50.jar (version 1.3)
/Users/przemek/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib/1.3.50/b529d1738c7e98bbfa36a4134039528f2ce78ebf/kotlin-stdlib-1.3.50.jar (version 1.3)
/Users/przemek/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-common/1.3.50/3d9cd3e1bc7b92e95f43d45be3bfbcf38e36ab87/kotlin-stdlib-common-1.3.50.jar (version 1.3)
/Users/przemek/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-jdk7/1.5.31/77e0f2568912e45d26c31fd417a332458508acdf/kotlin-stdlib-jdk7-1.5.31.jar (version 1.5)
/Users/przemek/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib/1.5.31/6628d61d0f5603568e72d2d5915d2c034b4f1c55/kotlin-stdlib-1.5.31.jar (version 1.5)
/Users/przemek/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-common/1.5.31/43331609c7de811fed085e0dfd150874b157c32/kotlin-stdlib-common-1.5.31.jar (version 1.5)
w: Some runtime JAR files in the classpath have an incompatible version. Consider removing them from the classpath
I needed to change Kotlin and Gradle versions to use qr_code_scanner plugin:
https://pub.dev/packages/qr_code_scanner#android-integration
When I remove wakelock plugin from my project, error also disappears.
Is there any solution to fix / avoid this error / warning?
I have also found, that from Flutter 2.9, the minimal Kotlin version will be 1.5.31:
https://docs.flutter.dev/release/breaking-changes/kotlin-version
Taking it into consideration, would you change your plugin's Kotlin / Gradle version?
Would it fix my problem?
paj-co commented
With version 0.6.0+1 no more error! Thx!
creativecreatorormaybenot commented
@paj-co Thanks for testing ! ❤️