【发布时间】:2021-01-30 21:55:16
【问题描述】:
我尝试在 Room DAO 上使用 Flowable,但它给了我这个错误:
error: Not sure how to convert a Cursor to this method's return type
Flowable<List<Category>> getAllCategories();
我的查询如下所示:
@Query("select * from categories_table order by name;")
Flowable<List<Category>> getAllCategories();
依赖关系:
def room_version = "2.3.0-beta01"
implementation "android.arch.persistence.room:runtime:$room_version"
annotationProcessor "android.arch.persistence.room:compiler:$room_version"
implementation "androidx.room:room-rxjava3:$room_version"
【问题讨论】:
标签: android rx-java android-room