whataa / noDrawable

一个旨在减少99%的drawable.xml文件的库,可直接在布局文件中对任意View声明drawable属性。

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

cannot find symbol class DataBinderMapperImpl

whataa opened this issue · comments

编译时如果出现该错误,请检查是否因为你在gradle.properties中启用了:

android.databinding.enableV2

这是Android Gradle plugin在3.1.+版本新增的一个实验性的特性,并且不向后兼容;该特性在3.2.版本开始才默认启用,并且向后兼容。
具体的可以查看关于DataBinding V2的官方文档:New data binding compiler for binding classes

也就是说,如果你的项目的Android Gradle plugin是3.1.+,就请不要开启该特性,即移除上述的配置语句。

由于com.android.tools.build:gradle:3.2.0 还未发布,所以我建议大家暂时不要开启DataBinding V2。

参考issues:

  1. DataBinderMapperImpl() is not generated
  2. Data Binding Compiler V2