数据库模块中的数据绑定 [英] Data binding in library module

查看:139
本文介绍了数据库模块中的数据绑定的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有两个模块的项目:库和示例。一切正常,因为我想在我的库模块中使用数据绑定。

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;

我使用 gradle 2.1.2 并且还用 2.2.0-beta2 进行了测试。

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

这两个模块都具有以下输入:

Both modules has import for:

dataBinding {
  enabled true
}

当我将 DataBinding 的代码移动到单个模块项目代码工作正常时。

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

有没有人有类似的问题?

Has anyone had similar problem?

推荐答案

有:

Found resolution, I had:

testCoverageEnabled true

位于 debug 部分,显示此错误。

in debug section which was showing this error.

这篇关于数据库模块中的数据绑定的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆