Running Gradle task ‘assembleDebug’… e:
C:/Users/PRINCE/.gradle/caches/transforms-3/20e1315bc8f4a1bdfeb295f8a2d8ce13/transformed/jetified-play-services-measurement-api-22.1.0-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.9999, expected version is 1.7.1. e:
C:/Users/PRINCE/.gradle/caches/transforms-3/539b20f16b7c8d7364edb4409aa18ddb/transformed/jetified-play-services-measurement-impl-22.1.0-api.jar!/META-INF/java.com.google.android.gms.libs.filecompliance.proto_file_access_api_type_kt_proto_lite.kotlin_module:
Module was compiled with an incompatible version of Kotlin. The binary
version of its metadata is 1.9.9999, expected version is 1.7.1. e:
C:/Users/PRINCE/.gradle/caches/transforms-3/539b20f16b7c8d7364edb4409aa18ddb/transformed/jetified-play-services-measurement-impl-22.1.0-api.jar!/META-INF/third_party.java_src.protobuf.current.java.com.google.protobuf.kotlin_only_for_use_in_proto_generated_code_its_generator_and_tests.kotlin_module:
Module was compiled with an incompatible version of Kotlin. The binary
version of its metadata is 1.9.9999, expected version is 1.7.1. e:
C:/Users/PRINCE/.gradle/caches/transforms-3/539b20f16b7c8d7364edb4409aa18ddb/transformed/jetified-play-services-measurement-impl-22.1.0-api.jar!/META-INF/third_party.java_src.protobuf.current.java.com.google.protobuf.kotlin_shared_runtime.kotlin_module:
Module was compiled with an incompatible version of Kotlin. The binary
version of its metadata is 1.9.9999, expected version is 1.7.1. e:
C:/Users/PRINCE/.gradle/caches/transforms-3/d8d45bed39c0940e615784b328fea50f/transformed/jetified-kotlin-stdlib-2.0.20.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.9.0, expected version is 1.7.1. e:
C:/Users/PRINCE/.gradle/caches/transforms-3/d8d45bed39c0940e615784b328fea50f/transformed/jetified-kotlin-stdlib-2.0.20.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.9.0, expected version is 1.7.1. e:
C:/Users/PRINCE/.gradle/caches/transforms-3/d8d45bed39c0940e615784b328fea50f/transformed/jetified-kotlin-stdlib-2.0.20.jar!/META-INF/kotlin-stdlib.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 ‘:app:compileDebugKotlin’.
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 1m 59s
┌─ 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 the │
│ version number of the plugin with id "org.jetbrains.kotlin.android" in the plugins block of │
│ C:App DevloperAppsempireglassandroidsettings.gradle. │
│ │
│ Alternatively (if your project was created before Flutter 3.19), update │
│ C:App DevloperAppsempireglassandroidbuild.gradle │
│ ext.kotlin_version = '<latest-version>' │
└──────────────────────────────────────────────────────────────────────────────────────────────┘
Error: Gradle task assembleDebug failed with exit code 1
Can someone assist me in resolving this issue that occurred following the fluter update?
2
Answers
If you are using or updated Flutter 3.19 or later then update the version number of the plugin with
id "org.jetbrains.kotlin.android"
in the plugins in yourandroid/settings.gradle
. For more information read this migration guide for older project.If you have created your project before Flutter 3.19 then update
ext.kotlin_version = '<latest-version>'
in yourandroid/build.gradle
.