Skip to content Skip to sidebar Skip to footer

Android Room Error: Fields Annotated With @Relation Must Be A List Or Set

I want to use One to One relationship in room that available from version 2.2.0-alpha1. My current room version 2.2.5 and I get an error: error: Fields annotated with @Relation mus

Solution 1:

There is change in android name since androidx.

Make sure to use androidx instead of arch(deprecated) in app

def room_version = "2.2.5"

implementation "androidx.room:room-runtime:$room_version"
annotationProcessor "androidx.room:room-compiler:$room_version"

Post a Comment for "Android Room Error: Fields Annotated With @Relation Must Be A List Or Set"