I am a beginner in android and I am trying to build an app that could fetch from an api but I am facing an error related to Dao , I also tried to read and understand the error but was unable to , please help me with my error , I am getting this error whenever I try to work with Dao and coroutines
here is the error location to which i was directed when i clicked on the error
CodePudding user response:
You should insert @ColumnInfo
top of your DB column like this
@Entity(tableName = "coin_price") @Parcelize data class CoinPrice(
@PrimaryKey
@ColumnInfo(name = "id")
val id: Int,
@ColumnInfo(name = "price")
var price: String? = null
) : Parcelable
CodePudding user response:
I found a solution but cannot say its the right one , if anyone have any info regarding then please share
I removed the suspend functions in the dao class and changed my appCompat dependency to 1.2.0