When introduced
//The google pagination library has no perception preloading implementation "androidx.paging:paging-runtime:3.0.0-alpha11" //viewmodel coroutine extension library implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:2.2.0"
Build error prompt:
Duplicate class kotlinx.coroutines.AbstractCoroutine found in modules kotlinx-coroutines-core-1.4.2.jar (org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.2) and kotlinx-coroutines-core-jvm-1.4.1.jar (org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.4.1)
Prompt that the duplicate class is actually caused by the reference to the Kotlin coroutine library in the paging library, so the library in it should be removed
Correct writing:
//The google pagination library has no perception preloading implementation("androidx.paging:paging-runtime:3.0.0-alpha11") { exclude group: "org.jetbrains.kotlinx" } //viewmodel coroutine extension library implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:2.2.0" //kotlin coroutine implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.4.2" implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.2"
Encountered during the project, record it