WalletConnect / Web3ModalFlutter

The Web3Modal for WalletConnect built using Flutter.
https://pub.dev/packages/web3modal_flutter
Apache License 2.0
27 stars 30 forks source link

Build Issue with Flutter APK Generation using WalletConnect/Web3ModalFlutter #103

Closed zubair15121716 closed 1 month ago

zubair15121716 commented 1 month ago

I am new to this so kindly if someone can help a little around this ! 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 during the APK generation process is 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 gradle.settings, as follows:

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.

Could you please provide guidance on how to address this compatibility issue and successfully generate the APK for my Flutter application using WalletConnect/Web3ModalFlutter?

quetool commented 1 month ago

Hello @zubair15121716, this looks like a kotlin-related issue, not WalletConnect's... Did you try this? https://stackoverflow.com/a/67801441/4379258

zubair15121716 commented 1 month ago

Thanks for the help the issue has been successfully resolved. I only need to make adjustments to the Kotlin version compatibility and internet permissions for android in the manifest file.

quetool commented 1 month ago

Thanks for the update!