Closed Jasperben closed 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
兄弟 我也遇到了 升级了as导致的,请问你那边怎么解决的呀
gradle版本高了,降低到3.5以下
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