18
Android-DataBinding-如何以及何时生成Binding类?
数据绑定指南国 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); 任何帮助表示赞赏。谢谢