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)
我更新了flutter sdk版本2.8.1到2.10.1,更新后出现错误
我不知道为什么会这样,我该怎么做?
对不起和谢谢你
2条答案
按热度按时间4si2a6ki1#
你还必须更新你的Kotlin版本,进入文件android/build.gradle并将
ext.kotlin_version
行(应该是第二行)更改为如下的ext.kotlin_version = '1.4.32'
你也可以更新你的IDE(AndroidStudios或VSCode)和插件
nhhxz33t2#
首先,我解决了这个问题与FrancescoPenasa的帮助感谢!!
解决方案如下,
build.gradle文件添加如下
在添加代码后得到另一个这样的错误
app/build.gradle文件添加代码