Back

Can't build Flutter Android project due to incompatible kotlin versions of appwrite required deps

  • 0
  • Flutter
laurencetroyv
2 Jun, 2024, 14:24

I created a brand new project, installed appwrite dependency and build the application it returns an error

TypeScript
e: C:/Users/laure/.gradle/caches/transforms-3/37a505752fc1e8a34e8d7cd4ae9aacd8/transformed/jetified-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/laure/.gradle/caches/transforms-3/37a505752fc1e8a34e8d7cd4ae9aacd8/transformed/jetified-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/laure/.gradle/caches/transforms-3/37a505752fc1e8a34e8d7cd4ae9aacd8/transformed/jetified-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/laure/.gradle/caches/transforms-3/47409b2e736f1681faac74780d7f27e7/transformed/jetified-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.
e: C:/Users/laure/.gradle/caches/transforms-3/a4c1c8e5330c7e97e2ee881d6fab841f/transformed/core-1.10.1-api.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.```

Flutter version:

Flutter 3.19.0 • channel stable • https://github.com/flutter/flutter.git Framework • revision bae5e49bc2 (4 months ago) • 2024-02-13 17:46:18 -0800 Engine • revision 04817c99c9 Tools • Dart 3.3.0 • DevTools 2.31.1

TypeScript

kotlin version in my `android\settings.gradle` was `1.7.10`
TL;DR
Developers encountering Kotlin version incompatibility issue with Appwrite dependency. Changing Kotlin version does not resolve the problem. Error message indicates Kotlin binaries are compiled with a higher version than expected. Flutter version is 3.19.0. Current Kotlin version in `android\settings.gradle` is 1.7.10. **Solution:** Update the Kotlin version in `android\settings.gradle` to 1.8.0 to align with the Kotlin binaries compiled with the Appwrite dependency.
laurencetroyv
2 Jun, 2024, 14:25

I then change the kotlin version to 1.6.0 and it still the same

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more