Data binding in library module

别来无恙 提交于 2019-12-25 04:07:43

问题


I have project with two modules: library and example. Everything working fine since I would like to use data binding in my library module.

When I try to use class in example module with databinding usage app crashes with:

Caused by: java.lang.NoClassDefFoundError: Failed resolution of: 
Lcom/app/test/databinding/TextItemBinding;

I'm using gradle 2.1.2 and also tested with 2.2.0-beta2.

Both modules has import for:

dataBinding {
  enabled true
}

When I move my code of DataBinding to single module project code is working correctly.

Has anyone had similar problem?


回答1:


Found resolution, I had:

testCoverageEnabled true

in debug section which was showing this error.



来源:https://stackoverflow.com/questions/39200465/data-binding-in-library-module

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!