Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cannot find symbol class DataBinderMapperImpl #1

Open
whataa opened this issue Sep 9, 2018 · 0 comments
Open

cannot find symbol class DataBinderMapperImpl #1

whataa opened this issue Sep 9, 2018 · 0 comments

Comments

@whataa
Copy link
Owner

whataa commented Sep 9, 2018

编译时如果出现该错误,请检查是否因为你在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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant