Reputation: 597
Launching lib/main.dart on Android SDK built for arm64 in debug mode...
e: /Users/madol.eeee/.gradle/caches/transforms-3/0fbf638dbdf70ad1725fe71b315a2ef4/transformed/jetified-window-1.0.0-beta04-api.jar!/META-INF/window_release.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.5.1, expected version is 1.1.15.
e: /Users/madol.eeee/.gradle/caches/transforms-3/2066b23b9b64ad3895a698a6d1fc8c5f/transformed/jetified-kotlin-stdlib-jdk7-1.5.30.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.5.1, expected version is 1.1.15.
e: /Users/madol.eeee/.gradle/caches/transforms-3/2a1bbf32034612557ecc12fcd06b65de/transformed/jetified-kotlin-stdlib-common-1.5.31.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.5.1, expected version is 1.1.15.
e: /Users/madol.eeee/.gradle/caches/transforms-3/38348b600f1be8b91fdb7c7730bf1eb5/transformed/jetified-kotlin-stdlib-jdk8-1.5.30.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.5.1, expected version is 1.1.15.
e: /Users/madol.eeee/.gradle/caches/transforms-3/5a29260d2a646236c4d0b2d60a4d47d8/transformed/jetified-kotlinx-coroutines-android-1.5.2.jar!/META-INF/kotlinx-coroutines-android.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.5.1, expected version is 1.1.15.
e: /Users/madol.eeee/.gradle/caches/transforms-3/74bfffd4e61971b016e3f927bbbd7521/transformed/jetified-kotlin-stdlib-1.5.31.jar!/META-INF/kotlin-stdlib.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.5.1, expected version is 1.1.15.
e: /Users/madol.eeee/.gradle/caches/transforms-3/7cde7f72a0842ac95e9281eb78688076/transformed/jetified-window-java-1.0.0-beta04-api.jar!/META-INF/window-java_release.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.5.1, expected version is 1.1.15.
e: /Users/madol.eeee/.gradle/caches/transforms-3/e84741d2b04d8859553c8e0a19bf4026/transformed/jetified-kotlinx-coroutines-core-jvm-1.5.2.jar!/META-INF/kotlinx-coroutines-core.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.5.1, expected version is 1.1.15.
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:compileDebugKotlin'.
> 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 8s
┌─ Flutter Fix ────────────────────────────────────────────────────────────────────────────────┐
│ [!] Your project requires a newer version of the Kotlin Gradle plugin. │
│ Find the latest version on https://kotlinlang.org/docs/gradle.html#plugin-and-versions, then │
│ update /Users/madol.eeee/project/traveling/flutter_traveling/android/build.gradle: │
│ ext.kotlin_version = '<latest-version>' │
└──────────────────────────────────────────────────────────────────────────────────────────────┘
Exception: Gradle task assembleDebug failed with exit code 1
Exited (sigterm)
i updated flutter sdk version 2.8.1 to 2.10.1 and get error after updated
i don't know why this hapening, how can i fix that?
sorry and thank you
Upvotes: 5
Views: 28063
Reputation: 1
Facing same type of issues and the fixes above are not helping:
Launching lib\main.dart on sdk gphone64 x86 64 in debug mode... Running Gradle task 'assembleDebug'... e: C:/Users/2000n/.gradle/caches/transforms-3/bd2d249c16b1bdaf35102b1c1dfeb30b/transformed/jetified-firebase-auth-23.1.0-api.jar!/META-INF/java.com.google.android.gmscore.integ.client.firebase-auth-api_firebase-auth-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/2000n/.gradle/caches/transforms-3/d13b60563cdac693f289f05d4426d38e/transformed/jetified-recaptcha-18.5.1-api.jar!/META-INF/java.com.google.android.libraries.abuse.recaptcha.common_common_ktx.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/2000n/.gradle/caches/transforms-3/d13b60563cdac693f289f05d4426d38e/transformed/jetified-recaptcha-18.5.1-api.jar!/META-INF/java.com.google.android.libraries.abuse.recaptcha.common_logger.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/2000n/.gradle/caches/transforms-3/d13b60563cdac693f289f05d4426d38e/transformed/jetified-recaptcha-18.5.1-api.jar!/META-INF/java.com.google.android.libraries.abuse.recaptcha.enterprise.android_impl.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/2000n/.gradle/caches/transforms-3/d13b60563cdac693f289f05d4426d38e/transformed/jetified-recaptcha-18.5.1-api.jar!/META-INF/java.com.google.android.libraries.abuse.recaptcha.enterprise.internal.release.com.google.android.recaptcha.internal_release.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/2000n/.gradle/caches/transforms-3/d13b60563cdac693f289f05d4426d38e/transformed/jetified-recaptcha-18.5.1-api.jar!/META-INF/java.com.google.android.libraries.abuse.recaptcha.enterprise.internal_impl.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/2000n/.gradle/caches/transforms-3/d13b60563cdac693f289f05d4426d38e/transformed/jetified-recaptcha-18.5.1-api.jar!/META-INF/java.com.google.android.libraries.abuse.recaptcha.enterprise.internal_internal.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/2000n/.gradle/caches/transforms-3/d13b60563cdac693f289f05d4426d38e/transformed/jetified-recaptcha-18.5.1-api.jar!/META-INF/java.com.google.android.libraries.abuse.recaptcha.enterprise.native_impl.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/2000n/.gradle/caches/transforms-3/d13b60563cdac693f289f05d4426d38e/transformed/jetified-recaptcha-18.5.1-api.jar!/META-INF/java.com.google.android.libraries.abuse.recaptcha.enterprise.public_public.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/2000n/.gradle/caches/transforms-3/d13b60563cdac693f289f05d4426d38e/transformed/jetified-recaptcha-18.5.1-api.jar!/META-INF/java.com.google.android.libraries.abuse.recaptcha.enterprise_enterprise.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/2000n/.gradle/caches/transforms-3/d13b60563cdac693f289f05d4426d38e/transformed/jetified-recaptcha-18.5.1-api.jar!/META-INF/java.com.google.android.libraries.abuse.recaptcha.metricscollection_metricscollection.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/2000n/.gradle/caches/transforms-3/d13b60563cdac693f289f05d4426d38e/transformed/jetified-recaptcha-18.5.1-api.jar!/META-INF/java.com.google.android.libraries.abuse.recaptcha.network_network.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/2000n/.gradle/caches/transforms-3/d13b60563cdac693f289f05d4426d38e/transformed/jetified-recaptcha-18.5.1-api.jar!/META-INF/recaptcha.proto.mobile_allowlist_kt_proto_lite.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/2000n/.gradle/caches/transforms-3/d13b60563cdac693f289f05d4426d38e/transformed/jetified-recaptcha-18.5.1-api.jar!/META-INF/recaptcha.proto.mobile_enterprise_sdk_kt_proto_lite.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/2000n/.gradle/caches/transforms-3/d13b60563cdac693f289f05d4426d38e/transformed/jetified-recaptcha-18.5.1-api.jar!/META-INF/recaptcha.proto.mobile_mobile_reload_kt_proto_lite.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/2000n/.gradle/caches/transforms-3/d13b60563cdac693f289f05d4426d38e/transformed/jetified-recaptcha-18.5.1-api.jar!/META-INF/recaptcha.proto.mobile_signal_collection_payload_kt_proto_lite.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/2000n/.gradle/caches/transforms-3/d13b60563cdac693f289f05d4426d38e/transformed/jetified-recaptcha-18.5.1-api.jar!/META-INF/recaptcha.proto.mobile_webview_sdk_kt_proto_lite.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/2000n/.gradle/caches/transforms-3/d13b60563cdac693f289f05d4426d38e/transformed/jetified-recaptcha-18.5.1-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.0, expected version is 1.7.1. e: C:/Users/2000n/.gradle/caches/transforms-3/d13b60563cdac693f289f05d4426d38e/transformed/jetified-recaptcha-18.5.1-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.0, expected version is 1.7.1.
FAILURE: Build failed with an exception.
A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction Compilation error. See log for more details
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.
BUILD FAILED in 52s
┌─ 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\2000n\StudioProjects\caption_generator\android\build.gradle: │ │ ext.kotlin_version = '' │ └────────────────────────────────────────────────────────────────────────────────────────────┘ Error: Gradle task assembleDebug failed with exit code 1
Upvotes: 0
Reputation: 23
In settings.gradle change this:
plugins {
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
id "com.android.application" version "7.3.2" apply false <-- This line
id "org.jetbrains.kotlin.android" version "2.0.0" apply false
}
for this:
plugins {
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
id "com.android.application" version "8.1.0" apply false
id "org.jetbrains.kotlin.android" version "2.0.0" apply false
}
and in the build.gradle file erase this lines:
buildscript {
ext.kotlin_version = '2.0.0'
}
this work for me.
Upvotes: 0
Reputation: 51
After the Flutter version 3.19.2 Kotlin Gradle plugin, move to settings.gradle from /android/build.gradle. so you can make the changes inside setting.gradle. You will replace the {kotlinVersion} with a stable version.
plugins {
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
id "com.android.application" version "{agpVersion}" apply false
id "org.jetbrains.kotlin.android" version "{kotlinVersion}" apply false
}
Upvotes: 5
Reputation: 21
The other solutions for old SDK flutter try this android/setting.gradle
plugins {
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
id "com.android.application" version "7.3.0" apply false
// START: FlutterFire Configuration
id "com.google.gms.google-services" version "4.3.15" apply false
// END: FlutterFire Configuration
id "org.jetbrains.kotlin.android" version "1.9.23" apply false //upadte this
}
include ":app"
Upvotes: 2
Reputation: 1
1- go to "https://kotlinlang.org/docs/releases.html#release-details" and get the last version of Kotlin ex "1.9.23"
2- in you_project/android/settings.gradle file in plugins replace CURRENT_VERSION with the last version of Kotlin
plugins {
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
id "com.android.application" version "7.3.0" apply false
id "org.jetbrains.kotlin.android" version "CURRENT_VERSION" apply false
}
Upvotes: 0
Reputation: 19
android/build.gradle
buildscript {
ext.kotlin_version = '1.8.22'//update this
repositories {
google()
mavenCentral()
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
allprojects {
repositories {
google()
mavenCentral()
}
}
rootProject.buildDir = '../build'
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(':app')
}
tasks.register("clean", Delete) {
delete rootProject.buildDir
}
Upvotes: 1
Reputation: 280
You have to also update your kotlin version,
go in file android/build.gradle and change ext.kotlin_version
line (should be the second line) to something like this ext.kotlin_version = '1.8.22'
( use latest version of kotlin )
You might also to update your ide (android studios or vscode) and the plugins
Upvotes: 6
Reputation: 597
first of all i solved this problem with FrancescoPenasa's help thanks!!
the solution is follows,
build.gradle file add follows
buildscript {
ext.kotlin_version = '1.6.10'
repositories {
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.1.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
after add code get another errer like this
Flutter multidex handling is disabled. If you wish to let the tool configure multidex, use the --mutidex flag.
app/build.gradle file add code
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'com.android.support:multidex:1.0.3'
}
Upvotes: 1