因为我通过启用发现了视图绑定的使用
buildFeatures { viewBinding true }
在我的 gradle 文件中,我再也没有在代码中使用 findviewById 。我现在想知道这样做是否有缺点。如果这是最好的方法,为什么android studio在创建新项目时默认不启用此选项?如果不是,我什么时候应该避免使用视图绑定?谢谢。
android gradle android-studio android-viewbinding
android ×1
android-studio ×1
android-viewbinding ×1
gradle ×1