goldze / MVVMHabit

👕基于谷歌最新AAC架构,MVVM设计模式的一套快速开发库,整合Okhttp+RxJava+Retrofit+Glide等主流模块,满足日常开发需求。使用该框架可以快速开发一个高质量、易维护的Android应用。
Apache License 2.0
7.6k stars 1.69k forks source link

错误: 无法将类 BindingRecyclerViewAdapters中的方法 setAdapter应用到给定类型; #83

Closed Jasperben closed 4 years ago

Jasperben commented 4 years ago

MVVMHabit/app/build/generated/ap_generated_sources/debug/out/com/goldze/mvvmhabit/databinding/FragmentNetworkBindingImpl.java:158: 错误: 无法将类 BindingRecyclerViewAdapters中的方法 setAdapter应用到给定类型; me.tatarka.bindingcollectionadapter2.BindingRecyclerViewAdapters.setAdapter(this.mboundView2, viewModelItemBinding, viewModelObservableList, adapter, (me.tatarka.bindingcollectionadapter2.BindingRecyclerViewAdapter.ItemIds)null, (me.tatarka.bindingcollectionadapter2.BindingRecyclerViewAdapter.ViewHolderFactory)null, (androidx.recyclerview.widget.AsyncDifferConfig)null); ^ 需要: RecyclerView,ItemBinding,List,BindingRecyclerViewAdapter,ItemIds<? super T>,ViewHolderFactory,AsyncDifferConfig 找到: RecyclerView,ItemBinding,ObservableList,BindingRecyclerViewAdapter<CAP#1>,ItemIds,ViewHolderFactory,AsyncDifferConfig 原因: 推断类型不符合等式约束条件 推断: CAP#1 等式约束条件: CAP#1,NetWorkItemViewModel 其中, T是类型变量: T扩展已在方法 setAdapter(RecyclerView,ItemBinding,List,BindingRecyclerViewAdapter,ItemIds<? super T>,ViewHolderFactory,AsyncDifferConfig)中声明的Object 其中, CAP#1是新类型变量: CAP#1从?的捕获扩展Object

yintao666 commented 4 years ago

兄弟 我也遇到了 升级了as导致的,请问你那边怎么解决的呀

o03150 commented 3 years ago

兄弟 我也遇到了 升级了as导致的,请问你那边怎么解决的呀

gradle版本高了,降低到3.5以下