-
Notifications
You must be signed in to change notification settings - Fork 255
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
item中绑定adapter报错binding:adapter="@{vm.mAdapter}" #187
Comments
Thank you for reporting your issue. In order to look into it, can you please provide a sample project and clear steps to reproduce? |
android.build.gradle version 3.5.3 |
If I define the adapter in the ViewModel like the simple code, there is no problem, But I don't know if this code will cause a memory leak? |
The following questions will appear: |
Project address in question:https://github.com/goldze/MVVMHabit uses binding collection adapter |
study |
怎么解决呢 |
我也遇到这个问题了,如何解决?(I am meet this problem too, how can i solve this problem?) |
在xml导入的类名后面加入 <Object>试试.
|
错误: 无法将类 BindingRecyclerViewAdapters中的方法 setAdapter应用到给定类型;
需要: RecyclerView,ItemBinding<? super T>,List,BindingRecyclerViewAdapter,ItemIds<? super T>,ViewHolderFactory,AsyncDifferConfig
找到: RecyclerView,ItemBinding,ObservableList,ContactAdapter,ItemIds,ViewHolderFactory,AsyncDifferConfig
原因: 推论变量 T 具有不兼容的限制范围
等式约束条件: CompanyInfo,ContactItemViewModel
上限: ContactItemViewModel,Object
其中, T是类型变量:
T扩展已在方法 setAdapter(RecyclerView,ItemBinding<? super T>,List,BindingRecyclerViewAdapter,ItemIds<? super T>,ViewHolderFactory,AsyncDifferConfig)中声明的Object
The text was updated successfully, but these errors were encountered: