gpt4 book ai didi

AndroidX 错误 : Both old and new data binding packages are available in dependencies

转载 作者:塔克拉玛干 更新时间:2023-11-02 19:01:00 37 4
gpt4 key购买 nike

我已经更新了 gradle.properties 文件添加:

android.useAndroidX=true
android.enableJetifier=true

但是我有这个错误:

e: [kapt] An exception occurred: android.databinding.tool.util.LoggedErrorException: failure, see logs for details.
AndroidX Error: Both old and new data binding packages are available in dependencies. Make sure you've setup jettifier for any data binding dependencies and also set android.useAndroidx in your gradle.properties file.
at android.databinding.tool.util.L.printMessage(L.java:134)
at android.databinding.tool.util.L.e(L.java:107)
at android.databinding.tool.Context.discoverAndroidX(Context.kt:62)

最佳答案

即使你enable the use of AndroidX

android.useAndroidX=true
android.enableJetifier=true

和数据绑定(bind)

android {
...
...
dataBinding {
enabled = true
}

}

你仍然会遇到与依赖相关的问题。

我建议你,自动重构和更改所有必要的 Android X 导入以避免此类问题。

选择你的项目,去哟 Refactor > Migrate to AndroidX

enter image description here

关于AndroidX 错误 : Both old and new data binding packages are available in dependencies,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54214680/

37 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com