Hi Vampire, I am getting an error in my project wh...
# community-support
s
Hi Vampire, I am getting an error in my project when I run the code. This is the error: Launching lib\main.dart on sdk gphone64 x86 64 in debug mode... Running Gradle task 'assembleDebug'... e: C:/Users/naray/.gradle/caches/transforms-3/92f82498697866a450f7480e9cff949b/transformed/jetified-play-services-measurement-api-22.0.2-api.jar!/META-INF/java.com.google.android.gmscore.integ.client.measurement_api_measurement_api.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.9.0, expected version is 1.7.1. FAILURE: Build failed with an exception. * What went wrong: Execution failed for task 'appcompileDebugKotlin'.
A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction
> Compilation error. See log for more details * Try:
Run with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.
Run with --scan to get full insights.
* Get more help at https://help.gradle.org BUILD FAILED in 4s ┌─ Flutter Fix ──────────────────────────────────────────────────────────────────────────────┐ │ [!] Your project requires a newer version of the Kotlin Gradle plugin. │ │ Find the latest version on https://kotlinlang.org/docs/releases.html#release-details, then │ │ update C:\Users\naray\Documents\Y3S1 │ │ Stuff\44MAPG\flutter\project_narayansuresh_16_pa32\android\build.gradle: │ │ ext.kotlin_version = '<latest-version>' │ └────────────────────────────────────────────────────────────────────────────────────────────┘ Error: Gradle task assembleDebug failed with exit code 1 Kotlin Help Kotlin releases | Kotlin Kotlin Help Kotlin releases | Kotlin https://kotlinlang.org/docs/releases.html#release-details [9:39 PM] S Narayan I have fixed the error but it is still showing that error, and one important thing I would like to point out is that I am actually using dart, not kotlin, so I am confused as to why this error is popping up.
v
This thread has nothing to do with Gradle, so is not really on-topic in this Slack. What you have is not a Gradle problem, but a version conflict in the Kotlin version you are using which even your error message tells you. I have no idea about Dart, but obviously you do use Kotlin or it would not try to compile Kotlin, even if it maybe is just implicitly. You say you fixed the error, but if the error is still displayed, you obviously did not fix the error. You are using Kotlin 1.7.x but try to use a library that is compiled with Kotlin 1.9.x which is not supported as Kotlin 1.7.x can read at most classes compiled with Kotlin 1.8.x. But as I said, this has nothing to do with Gradle, you might be better off asking in a Dart or Kotlin community.