When using pager, the StateFlowKt file cannot be found during compilation, but it does exist. What is the reason?
implementation "androidx.paging:paging-runtime:3.1.0"
if (requested.group == '.jetbrains.kotlinx' && requested.module.name =='kotlinx-coroutines-android') {
details.useVersion '1.3.0'
}
if (requested.group == '.jetbrains.kotlinx' && requested.module.name =='kotlinx-coroutines-core') {
details.useVersion '1.3.0'
}
Exception : java.lang.NoClassDefFoundError: Failed resolution of: Lkotlinx/coroutines/flow/StateFlowKt; (Ask Gemini) at androidx.paging.ConflatedEventBus.(ConflatedEventBus.kt:28) at androidx.paging.ConflatedEventBus.(ConflatedEventBus.kt:27) at androidx.paging.PageFetcher.(PageFetcher.kt:46) at androidx.paging.Pager.(Pager.kt:73)
How to fix this problem? I have tried changing the pager version but it didn't work.