Room在android api 28上不起作用。
我收到此错误:no such table: user (code 1 SQLITE_ERROR):, while compiling: select * from user
在其他版本上,数据库工作正常。可能是什么问题?
def room_version = "1.1.1"
implementation "android.arch.persistence.room:runtime:$room_version"
annotationProcessor "android.arch.persistence.room:compiler:$room_version"
implementation "android.arch.persistence.room:rxjava2:$room_version"
用户实体:
@Entity(tableName = "user")
public class User {
@SerializedName("user_id")
@PrimaryKey
private long userId;
@SerializedName("created_at")
private String createdAt;
@Expose
private String lastLogin;
@SerializedName("login_count")
private Integer loginCount;
@Expose
@Embedded
private UserProperties properties;
@IgnoreJson
private long localUpdatedAt;
@SerializedName("updated_at")
private String updatedAt;