luckybilly / CC

业界首个支持渐进式组件化改造的Android组件化开源框架,支持跨进程调用。Componentize your android project gradually.
https://luckybilly.github.io/CC-website/
Apache License 2.0
4.05k stars 635 forks source link

有没有用databinding加cc的?DataBinderMapperImpl好像没生成,不知道是怎么回事。 #18

Closed kevinroy-lo closed 6 years ago

kevinroy-lo commented 6 years ago

module中只要apply @@了cc-settings.gradle这个plugin, 在这个生成类中,

DataBinderMapperImpl() {
    addMapper(new com.XXX.DataBinderMapperImpl());
    addMapper(new com.android.databinding.library.baseAdapters.DataBinderMapperImpl());
    addMapper(new com.XXX.baselibs.DataBinderMapperImpl());
  }

貌似对应的Mapper没生成出来?导致DataBindingUtil.setContentView()返回为空...

spysoos commented 6 years ago

我也尝试在module里使用 databinding 直接报错 Failed resolution of: Landroid/databinding/DataBinderMapperImpl

luckybilly commented 6 years ago

是不是跟 issue#15 一样的问题? 在主app module中使用了组件中的databinding?

kevinroy-lo commented 6 years ago

是一样的问题,找到解决方法了,谢谢。