Room with RxJava3

Viewed 286

I tried to use Flowable on Room DAO but it is giving me this error:

error: Not sure how to convert a Cursor to this method's return type
Flowable<List<Category>> getAllCategories();

My query looks like this:

@Query("select * from categories_table order by name;")
Flowable<List<Category>> getAllCategories();

Dependencies:

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"
1 Answers

To fix this, try changing the implementation value to "androidx.room:room-runtime:2.3.0-beta01", and for the annotationProcessor use "androidx.room:room-compiler:2.3.0-beta01".

Related