'Module was compiled with an incom patible version of Kotlin. The binary version of its metadata is 1.6.0, expected version is 1.4.0
My app compiles, but after looking into a few related questions like (Module Error "Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.5.1, expected version is 1.1.16") How do we actually resolve these issues? My kotlin version is set to:
ext.kotlin_version = "1.6.21"
Gradle is:
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-all.zip
Specifically I'm concerned about these packages:
e: C:/Users/mywindowsusername/Documents/GitHub/myprojectname-prod-flutter-app/build/fluttertoast/tmp/kotlin-classes/release/META-INF/fluttertoast_release.kotlin_module: Modul
e was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.6.0, expected version is 1.4.0.
e: C:/Users/mywindowsusername/Documents/GitHub/myprojectname-prod-flutter-app/build/package_info_plus/tmp/kotlin-classes/release/META-INF/package_info_plus_release.kotlin_module: Module was compiled wit
h an incompatible version of Kotlin. The binary version of its metadata is 1.6.0, expected version is 1.4.0.
e: C:/Users/mywindowsusername/Documents/GitHub/myprojectname-prod-flutter-app/build/audioplayers/tmp/kotlin-classes/release/META-INF/audioplayers_release.kotlin_module: Module was compiled with an incom
patible version of Kotlin. The binary version of its metadata is 1.6.0, expected version is 1.4.0.
e: C:/Users/mywindowsusername/Documents/GitHub/myprojectname-prod-flutter-app/build/sensors_plus/tmp/kotlin-classes/release/META-INF/sensors_plus_release.kotlin_module: Module was compiled with an incom
patible version of Kotlin. The binary version of its metadata is 1.6.0, expected version is 1.4.0.
e: C:/Users/mywindowsusername/Documents/GitHub/myprojectname-prod-flutter-app/build/share_plus/tmp/kotlin-classes/release/META-INF/share_plus_release.kotlin_module: Module was compiled with an incompati
ble version of Kotlin. The binary version of its metadata is 1.6.0, expected version is 1.4.0.
e: C:/Users/mywindowsusername/Documents/GitHub/myprojectname-prod-flutter-app/build/location/tmp/kotlin-classes/release/META-INF/location_release.kotlin_module: Module was compiled with an incompatible
version of Kotlin. The binary version of its metadata is 1.6.0, expected version is 1.4.0.
Full Error Log:
Microsoft Windows [Version 10.0.19043.1645]
(c) Microsoft Corporation. All rights reserved.
C:\Users\mywindowsusername\Documents\GitHub\myprojectname-prod-flutter-app>flutter build apk --split-per-abi
Building with sound null safety
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: C:\flutter\.pub-cache\hosted\pub.dartlang.org\cloud_firestore-3.1.14\android\src\main\java\io\flutter\plugins\firebase\firestore\FlutterFi
rebaseFirestorePlugin.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: C:\flutter\.pub-cache\hosted\pub.dartlang.org\firebase_messaging-11.3.0\android\src\main\java\io\flutter\plugins\firebase\messaging\JobInt
entService.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: C:\flutter\.pub-cache\hosted\pub.dartlang.org\flutter_native_image-0.0.6+1\android\src\main\java\com\example\flutternativeimage\FlutterNat
iveImagePlugin.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: C:\flutter\.pub-cache\hosted\pub.dartlang.org\flutter_sound-9.2.12\android\src\main\java\com\dooboolab\fluttersound\FlutterSound.java uses
or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: C:\flutter\.pub-cache\hosted\pub.dartlang.org\google_maps_flutter-2.1.5\android\src\main\java\io\flutter\plugins\googlemaps\Convert.java uses or override
s a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: C:\flutter\.pub-cache\hosted\pub.dartlang.org\path_provider_android-2.0.11\android\src\main\java\io\flutter\plugins\pathprovider\PathProviderPlugin.java
uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Note: C:\flutter\.pub-cache\hosted\pub.dartlang.org\video_thumbnail-0.5.0\android\src\main\java\xyz\justsoft\video_thumbnail\VideoThumbnailPlugin.java uses unc
hecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
WARNING: [Processor] Library 'C:\Users\mywindowsusername\.gradle\caches\modules-2\files-2.1\org.robolectric\shadows-framework\4.3.1\da048a93951f4d9e46519749c53b0f868dfdf42
5\shadows-framework-4.3.1.jar' contains references to both AndroidX and old support library. This seems like the library is partially migrated. Jetifier will t
ry to rewrite the library anyway.
Example of androidX reference: 'androidx/test/runner/lifecycle/Stage'
Example of support library reference: 'android/support/annotation/NonNull'
WARNING: [Processor] Library 'C:\Users\mywindowsusername\.gradle\caches\modules-2\files-2.1\org.robolectric\shadows-framework\4.3\150103d5732c432906f6130b734e7452855dd67b\
shadows-framework-4.3.jar' contains references to both AndroidX and old support library. This seems like the library is partially migrated. Jetifier will try t
o rewrite the library anyway.
Example of androidX reference: 'androidx/test/runner/lifecycle/Stage'
Example of support library reference: 'android/support/annotation/NonNull'
w: Runtime JAR files in the classpath should have the same version. These files were found in the classpath:
C:/Users/mywindowsusername/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-jdk7/1.5.30/525f5a7fa6d7790a571c07dd24214ed2dda352fe/kotlin-stdlib-jdk
7-1.5.30.jar (version 1.5)
C:/Users/mywindowsusername/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-jdk8/1.5.30/5fd47535cc85f9e24996f939c2de6583991481b0/kotlin-stdlib-jdk
8-1.5.30.jar (version 1.5)
C:/Users/mywindowsusername/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib/1.5.31/6628d61d0f5603568e72d2d5915d2c034b4f1c55/kotlin-stdlib-1.5.31.j
ar (version 1.5)
C:/Users/mywindowsusername/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-common/1.5.31/43331609c7de811fed085e0dfd150874b157c32/kotlin-stdlib-co
mmon-1.5.31.jar (version 1.5)
C:/Users/mywindowsusername/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-jdk7/1.6.21/568c1b78a8e17a4f35b31f0a74e2916095ed74c2/kotlin-stdlib-jdk
7-1.6.21.jar (version 1.6)
C:/Users/mywindowsusername/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib/1.6.21/11ef67f1900634fd951bad28c53ec957fabbe5b8/kotlin-stdlib-1.6.21.j
ar (version 1.6)
C:/Users/mywindowsusername/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-common/1.6.21/5e5b55c26dbc80372a920aef60eb774b714559b8/kotlin-stdlib-c
ommon-1.6.21.jar (version 1.6)
C:/Users/mywindowsusername/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib/1.6.10/b8af3fe6f1ca88526914929add63cf5e7c5049af/kotlin-stdlib-1.6.10.j
ar (version 1.6)
C:/Users/mywindowsusername/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-common/1.6.10/c118700e3a33c8a0d9adc920e9dec0831171925/kotlin-stdlib-co
mmon-1.6.10.jar (version 1.6)
C:/Users/mywindowsusername/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-jdk7/1.6.10/e1c380673654a089c4f0c9f83d0ddfdc1efdb498/kotlin-stdlib-jdk
7-1.6.10.jar (version 1.6)
w: Some runtime JAR files in the classpath have an incompatible version. Consider removing them from the classpath
e: C:/Users/mywindowsusername/Documents/GitHub/myprojectname-prod-flutter-app/build/video_compress/tmp/kotlin-classes/release/META-INF/video_compress_release.kotlin_module: M
odule was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.6.0, expected version is 1.4.0.
e: C:/Users/mywindowsusername/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-jdk7/1.6.21/568c1b78a8e17a4f35b31f0a74e2916095ed74c2/kotlin-stdlib-jdk7
-1.6.21.jar!/META-INF/kotlin-stdlib-jdk7.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.6.0
, expected version is 1.4.0.
e: C:/Users/mywindowsusername/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib/1.6.21/11ef67f1900634fd951bad28c53ec957fabbe5b8/kotlin-stdlib-1.6.21.ja
r!/META-INF/kotlin-stdlib.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.6.0, expected vers
ion is 1.4.0.
e: C:/Users/mywindowsusername/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-common/1.6.21/5e5b55c26dbc80372a920aef60eb774b714559b8/kotlin-stdlib-co
mmon-1.6.21.jar!/META-INF/kotlin-stdlib-common.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is
1.6.0, expected version is 1.4.0.
e: C:/Users/mywindowsusername/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib/1.6.10/b8af3fe6f1ca88526914929add63cf5e7c5049af/kotlin-stdlib-1.6.10.ja
r!/META-INF/kotlin-stdlib.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.6.0, expected vers
ion is 1.4.0.
e: C:/Users/mywindowsusername/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-common/1.6.10/c118700e3a33c8a0d9adc920e9dec0831171925/kotlin-stdlib-com
mon-1.6.10.jar!/META-INF/kotlin-stdlib-common.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is
1.6.0, expected version is 1.4.0.
e: C:/Users/mywindowsusername/Documents/GitHub/myprojectname-prod-flutter-app/build/google_api_headers/tmp/kotlin-classes/release/META-INF/google_api_headers_release.kotlin_m
odule: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.6.0, expected version is 1.4.0.
e: C:/Users/mywindowsusername/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-jdk7/1.6.10/e1c380673654a089c4f0c9f83d0ddfdc1efdb498/kotlin-stdlib-jdk7
-1.6.10.jar!/META-INF/kotlin-stdlib-jdk7.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.6.0
, expected version is 1.4.0.
e: C:/Users/mywindowsusername/Documents/GitHub/myprojectname-prod-flutter-app/build/fluttertoast/tmp/kotlin-classes/release/META-INF/fluttertoast_release.kotlin_module: Modul
e was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.6.0, expected version is 1.4.0.
e: C:/Users/mywindowsusername/Documents/GitHub/myprojectname-prod-flutter-app/build/package_info_plus/tmp/kotlin-classes/release/META-INF/package_info_plus_release.kotlin_module: Module was compiled wit
h an incompatible version of Kotlin. The binary version of its metadata is 1.6.0, expected version is 1.4.0.
e: C:/Users/mywindowsusername/Documents/GitHub/myprojectname-prod-flutter-app/build/audioplayers/tmp/kotlin-classes/release/META-INF/audioplayers_release.kotlin_module: Module was compiled with an incom
patible version of Kotlin. The binary version of its metadata is 1.6.0, expected version is 1.4.0.
e: C:/Users/mywindowsusername/Documents/GitHub/myprojectname-prod-flutter-app/build/sensors_plus/tmp/kotlin-classes/release/META-INF/sensors_plus_release.kotlin_module: Module was compiled with an incom
patible version of Kotlin. The binary version of its metadata is 1.6.0, expected version is 1.4.0.
e: C:/Users/mywindowsusername/Documents/GitHub/myprojectname-prod-flutter-app/build/share_plus/tmp/kotlin-classes/release/META-INF/share_plus_release.kotlin_module: Module was compiled with an incompati
ble version of Kotlin. The binary version of its metadata is 1.6.0, expected version is 1.4.0.
e: C:/Users/mywindowsusername/Documents/GitHub/myprojectname-prod-flutter-app/build/location/tmp/kotlin-classes/release/META-INF/location_release.kotlin_module: Module was compiled with an incompatible
version of Kotlin. The binary version of its metadata is 1.6.0, expected version is 1.4.0.
Running Gradle task 'assembleRelease'... 279.5s
√ Built build\app\outputs\flutter-apk\app-armeabi-v7a-release.apk (53.9MB).
C:\Users\mywindowsusername\Documents\GitHub\myprojectname-prod-flutter-app>
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|