kotlin coroutines trying to build recipes app based on recipessdb with kotlin +coroutines and mvvm but i have an error that i don't know
here is my api sevice
interface GetDataServices {
@GET("categories.php")
suspend fun getCategoryList(): Category
here is my Repositor
class Repository(
var getDataService : GetDataServices ?=null,
var dao: RecipeDao?=null,
var application: Application
){
//-1-get Main category from api
suspend fun getMainCategory(): Category? {
var res_rep= getDataService?.getCategoryList()
return res_rep
Log.v("res_rep_get",res_rep.toString())...