gpt4 book ai didi

android - 将 Android Studio 更新到 4.0 后,Android View Binding 库出错

转载 作者:行者123 更新时间:2023-12-03 22:29:38 30 4
gpt4 key购买 nike

昨晚我升级了我的 Android Studio 4.0,它在 View Binding 中显示错误。我在我的 Gradle 中尝试了以下代码。但它显示这样的错误,

Could not find method buildFeatures() for arguments [build_99kmfmmumw2bmow3xjrnbxlx1$_run_closure1$_closure5@4155ecc3] on extension 'android' of type com.android.build.gradle.internal.dsl.BaseAppModuleExtension.
android {
buildFeatures {
viewBinding = true
}
}

最佳答案

尝试:

dataBinding{
enabled = true
}

关于android - 将 Android Studio 更新到 4.0 后,Android View Binding 库出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62472279/

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