【发布时间】:2020-03-06 15:01:25
【问题描述】:
有没有办法通过RxJava3 使用Room 数据库?
当我尝试从 Query 房间返回 Observable 或 Single 时出现以下错误:
error: Not sure how to convert a Cursor to this method's return type
public abstract io.reactivex.rxjava3.core.Single<java.util.List<com.osama.movieshow.data.movie.Movie>> getAllFavorites();
我的房间查询:
@Query("select * from favorites")
fun getAllFavorites():Single<List<Movie>>
我正在从import io.reactivex.rxjava3.core.Single 导入Single
【问题讨论】: