By default, a Binding class will be generated based on the name of the layout
file, converting it to Pascal case and suffixing “Binding” to it.
The above layout file was activity_main.xml so the generate class was ActivityMainBinding.
什么时候会生成 Binding 类,这里说 ActivityMainBinding。我有编译时间错误。“无法解析 ActivityMainBinding”。
ActivityMainBinding binding = DataBindingUtil.setContentView(this, R.layout.main_activity);
感谢你的帮助,谢谢