Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

java.lang.IllegalArgumentException: Unable to create converter for class com.androiddevs.mvvmnewsapp.ui.pojo.NewsResponse #49

Open
malaviya-parth opened this issue May 23, 2024 · 0 comments

Comments

@malaviya-parth
Copy link

I am getting this error, Checked on Stackoverflow but didn't get any solution for it.
My files

NewsResponse.kt

package com.androiddevs.mvvmnewsapp.ui.pojo

data class NewsResponse(
    val articles: List<Article>,
    val status: String,
    val totalResults: Int
)

Article.kt

package com.androiddevs.mvvmnewsapp.ui.pojo

import androidx.room.Entity
import androidx.room.PrimaryKey


@Entity(
    tableName = "articles"
)
data class Article(
    @PrimaryKey(autoGenerate = true)
    var id: Int? = null,
    val author: String,
    val content: String,
    val description: String,
    val publishedAt: String,
    val source: Source,
    val title: String,
    val url: String,
    val urlToImage: String
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant