在我的多模块Android项目中,我面临着Kotlin版本冲突的问题.在try 构建时,我收到以下错误:

.gradle/caches/transforms-3/d03e801dea1b3ff22428c51c576b323b/transformed/jetified-agent-android-8.283.1.1004-api.jar!/META-INF/agent.instrumentorAPI.compose_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.6.0.

我的项目由几个模块(profilesurveyapp)组成,每个模块都有自己的build.gradle文件.在项目级build.gradle中,我将Kotlin版本设置为1.6.0:

buildscript {
    ext.kotlin_version = '1.6.0'
}```


However, I am facing an issue where the module seems to require Kotlin 1.9.0. Here are some key details of my setup:

Android Studio version: [Android Studio Giraffe | 2022.3.1 Patch 3]
Kotlin version: 1.6.0 (as specified in the project's build.gradle)
Gradle version: [7.0.4]



I tried fixing a Kotlin version conflict in my project by clearing the Gradle cache, both via Android Studio and manually in the .gradle folder, restarting Android Studio, and aligning Kotlin versions across all modules. Despite these efforts, the error 'Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.9.0, expected version is 1.6.0' still appears, suggesting unresolved issues in project configuration or dependencies.

Could anyone advise on resolving this conflict without upgrading to Kotlin 1.9.0, despite having Kotlin 1.6.0 set in the project-level build.gradle?

Thanks in advance for any insights or suggestions!

Best regards.

推荐答案

8.283.1.1004是DyNatrace的版本.如果不想升级到1.9.0,请回退到最新版本

Android相关问答推荐

编写视觉转型

如何使TextField的背景透明?

AdMob:MobileAds. initialize()—java. lang. xml对于某些设备不能强制转换为java. lang. String""

Jetpack编写Lazy列滑动删除动画不顺利结束

显示本地房间数据库中未保存的项目的动态列表

使用Retrofit2的API调用:我如何能够一直进行API调用,以更新数据而无需重新打开应用程序

不能在LazyGrid-Jetpack Compose中使用填充最大宽度或填充父项最大宽度

在柯特林连续测量网速

如何解决Gradle构建错误:java.lang.NoSuchMethodError

Android-交叉引用表中的ForeignKey用于什么?

React-Native Manifest 合并失败并出现多个错误

同样的参数值下,为什么requiredSizeIn不等于requiredWidthIn + requiredHeightIn?

延时kotlin中时分秒的使用方法

为什么项目捕获对象给我在 Compose 中找不到参考

Gradle 构建错误:找不到 semver4j-0.16.4-nodeps.jar

如何在 MAUI 项目中包含每个平台的现有 C++ 库?

在 jetpack compose 中使用 .shadow 和 Button 会导致问题

Kotlin Compose 全局页脚视图

操作系统会终止已启动的服务并调用Service.onDestroy吗?

在 Android 10 (API 29) 中隐藏状态栏并在应用程序中使用其空间