尽管我从 udacity 获得了另一个代码并且我完全按照在那里完成的方式进行了几天,但仍然出现相同的错误。我错过了什么吗?
I have searched everywhere and tried many ways to solve this problem but i still get the same error "requires explicit JsonAdapter to be registered".
I tried rebuild project, sync with file system, delete the dependencies and sync again BUT it never worked.
数据类
import android.os.Parcelable
import com.squareup.moshi.Json
import com.squareup.moshi.JsonClass
import kotlinx.android.parcel.Parcelize
@Parcelize
data class Post(
@Json(name = "id") var postId: Int,
val title: String,
val userId: Int,
val postDate: String,
val location: String,
@Json(name = "pictureUrl") …Run Code Online (Sandbox Code Playgroud)