- Котлин Версия: 2.2.0 < /li>
gradle version: 8.14.3 < /li>
jvm target: 17 < /li>
< /ul>
Но я продолжаю. />e: .../jetified-play-services-measurement-api-23.0.0-api.jar!/META-INF/...kotlin_moduleModule was compiled with an incompatible version of Kotlin. The binary version of its metadata is 2.1.0, expected version is 1.8.0.
...
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 9s
┌─ Flutter Fix ────────────────────────────────────────────────────────────────────────────────────┐
│ [!] Your project requires a newer version of the Kotlin Gradle plugin. │
│ Find the latest version on https://kotlinlang.org/docs/releases.ht ... se-details, then │
│ update the │
│ version number of the plugin with id "org.jetbrains.kotlin.android" in the plugins block of │
│ /../android │
│ /settings.gradle. │
│ │
│ Alternatively (if your project was created before Flutter 3.19), update │
│ /../android │
│ /build.gradle │
│ ext.kotlin_version = '' │
└──────────────────────────────────────────────────────────────────────────────────────────────────┘
Error: Gradle task assembleDebug failed with exit code 1
I tried:
Upgrading the Kotlin Gradle plugin to 2.2.0 - Setting jvmTarget to 17
- Cleaning with flutter clean and running again
Чтобы решить проблему, я в конечном итоге пытаюсь исключить проблемы, такие как это: < /p>
implementation('com.google.firebase:firebase-analytics:23.0.0') {
exclude group: 'com.google.android.gms', module: 'play-services-measurement-api'
exclude group: 'com.google.android.gms', module: 'play-services-measurement-impl'
}
Эти исключения не влияют на базовую функциональность Firebase Analytics и не позволяют вашей сборке успешно завершить в режиме отладки.
Однако попытка запустить Fluther Build Apk -release приведет вас к другой ошибке:
Execution failed for task ':app:minifyReleaseWithR8'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.R8Task$R8Runnable
Подробнее здесь: https://stackoverflow.com/questions/797 ... kotlin-the
Мобильная версия