android / codelab-android-paging

Jetpack Paging codelab
Apache License 2.0
498 stars 268 forks source link

Room Error: Not sure how to handle query method's return type #218

Open inkp80 opened 2 years ago

inkp80 commented 2 years ago

Error on branch step13-19_network_and_database

Seem like occurring after adopt Kotlin 1.6.

https://github.com/googlecodelabs/android-paging/blob/step13-19_network_and_database/build.gradle

buildscript {
    ext.kotlin_version = '1.6.0'
    repositories {
        google()
        mavenCentral()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:7.0.4'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
    }
}

It should be downgrade to kotlin 1.5 or upgrade to Room 2.4 (in alpha)

NickMitrokhin commented 2 years ago

I faced the same issue. Resolved with downgrade to Kotlin 1.5. Thanks.

mertakd commented 10 months ago

Upgrade to Room 2.4 and add "androidx.room:room-paging:$roomVersion" (Android Studio/ Hedgehog)