Android Kotlin 中的 ROOM 数据库错误
Error With ROOM Database in Android Kotlin
我是 android 的初学者,我正在尝试构建一个可以从 api 获取的应用程序,但我遇到了与 Dao 相关的错误,我也尝试阅读和理解错误但无法解决,请帮助我解决错误,每当我尝试使用 Dao 和协同程序时都会收到此错误
Here is the Error
Here is my dao code
here is the error location to which i was directed when i clicked on the error
Article class
您应该像这样在数据库列的顶部插入 @ColumnInfo
@Entity(表名 = "coin_price")
@Parcelize
数据 class CoinPrice(
@PrimaryKey
@ColumnInfo(name = "id")
val id: Int,
@ColumnInfo(name = "price")
var price: String? = null
) : Parcelable
我找到了一个解决方案,但不能说它是正确的,如果有人有任何相关信息,请分享
我删除了 dao 中的挂起函数 class
并将我的 appCompat 依赖项更改为 1.2.0
我是 android 的初学者,我正在尝试构建一个可以从 api 获取的应用程序,但我遇到了与 Dao 相关的错误,我也尝试阅读和理解错误但无法解决,请帮助我解决错误,每当我尝试使用 Dao 和协同程序时都会收到此错误
Here is the Error
Here is my dao code
here is the error location to which i was directed when i clicked on the error
Article class
您应该像这样在数据库列的顶部插入 @ColumnInfo
@Entity(表名 = "coin_price") @Parcelize 数据 class CoinPrice(
@PrimaryKey
@ColumnInfo(name = "id")
val id: Int,
@ColumnInfo(name = "price")
var price: String? = null
) : Parcelable
我找到了一个解决方案,但不能说它是正确的,如果有人有任何相关信息,请分享
我删除了 dao 中的挂起函数 class 并将我的 appCompat 依赖项更改为 1.2.0