I have successfully set up WalletConnect and Web3Modal in my Flutter application according to the documentation provided. The integration works perfectly fine when running the application in debug mode (flutter run), but I encounter an issue when attempting to build the APK using flutter build apk.
The error message I receive is of "kotlin gradle plugin" as follows:
e: C:/Users/DELL/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib/1.8.22/636bf8b320e7627482771bbac9ed7246773c02bd/kotlin-stdlib-1.8.22.jar!/META-INF/kotlin-stdlib-jdk8.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.8.0, expected version is 1.6.0.
e: C:/Users/DELL/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-common/1.8.22/1a8e3601703ae14bb58757ea6b2d8e8e5935a586/kotlin-stdlib-common-1.8.22.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.8.0, expected version is 1.6.0.
I have attempted to resolve this issue by adjusting the settings in settings.gradle:
plugins {
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
id "com.android.application" version "7.3.0" apply false
// from id "org.jetbrains.kotlin.android" version "1.7.10" apply false to id "org.jetbrains.kotlin.android" version "1.8.10" apply false
id "org.jetbrains.kotlin.android" version "1.8.10" apply false
}
I changed the version of org.jetbrains.kotlin.android from 1.7.10 to 1.8.10, but unfortunately, this adjustment did not resolve the issue And Gave :
e: D:/file/flutter-login/flutter_meta/meta_votes/build/coinbase_wallet_sdk/.transforms/7a744c75ca253dc3492a7d97df04dbf8/transformed/out/jars/classes.jar!/META-INF/coinbase_wallet_sdk_release.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.8.0, expected version is 1.6.0.
e: D:/file/flutter-login/flutter_meta/meta_votes/build/package_info_plus/.transforms/aa087afe4aa803c0095dfc56258fae7d/transformed/out/jars/classes.jar!/META-INF/package_info_plus_release.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.8.0, expected version
is 1.6.0.
e: D:/file/flutter-login/flutter_meta/meta_votes/build/appcheck/.transforms/818cdf2464331e05845fdc9f1bf59bb0/transformed/out/jars/classes.jar!/META-INF/appcheck_release.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.8.0, expected version is 1.6.0.
e: C:/Users/DELL/.gradle/caches/transforms-3/d30e2ff50d26b8df2835e11ad1292c14/transformed/core-1.10.1/jars/classes.jar!/META-INF/core_release.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.8.0, expected version is 1.6.0.
e: C:/Users/DELL/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib/1.8.22/636bf8b320e7627482771bbac9ed7246773c02bd/kotlin-stdlib-1.8.22.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.8.0, expected version is 1.6.0.
e: C:/Users/DELL/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib/1.8.22/636bf8b320e7627482771bbac9ed7246773c02bd/kotlin-stdlib-1.8.22.jar!/META-INF/kotlin-stdlib.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.8.0, expected version is
1.6.0.
e: C:/Users/DELL/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib/1.8.22/636bf8b320e7627482771bbac9ed7246773c02bd/kotlin-stdlib-1.8.22.jar!/META-INF/kotlin-stdlib-jdk8.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.8.0, expected version is 1.6.0.
e: C:/Users/DELL/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-common/1.8.22/1a8e3601703ae14bb58757ea6b2d8e8e5935a586/kotlin-stdlib-common-1.8.22.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.8.0, expected version is 1.6.0.
can anyone please provide guidance on how to address this compatibility issue and successfully generate the APK for my Flutter application using WalletConnect/Web3ModalFlutter?
Please change the kotlin ext version in your build.gradle file
plugin in your app/build.gradle can remain: