skip to Main Content

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

Here is my dao code

here is the error location to which i was directed when i clicked on the error

Article class

2

Answers


  1. Chosen as BEST ANSWER

    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


  2. 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 
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search