简体   繁体   English

Android 添加 viewBinding 后 true 应用无法构建

[英]Android after adding viewBinding true app can't build

I've fully working application, then I've decided to migrate to viewBinding and it does not build anymore.我已经完全可以使用应用程序,然后我决定迁移到 viewBinding 并且它不再构建。

Here is my error -这是我的错误- 好像生成了错误的绑定类,不确定,请帮忙 在此处输入图像描述

My gradle setup -我的 gradle 设置 - 在此处输入图像描述

在此处输入图像描述

It looks like you have a toggle_style.xml file in your layout directory that isn't actually a layout.看起来您的layout目录中有一个toggle_style.xml文件,它实际上并不是一个布局。 You'll want to move that to the correct directory so that View Binding doesn't try to process that file.您需要将其移动到正确的目录,以便 View Binding 不会尝试处理该文件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM