koin
koin copied to clipboard
Unresolved reference for "singleOf" and "module" in 3.5.0, works on 3.4.3
Describe the bug Hi all, I'm seeing an issue with some imports when I try to update to koin-android 3.5.0. My file looks like this:
import org.koin.core.module.dsl.singleOf
import org.koin.dsl.module
val dataModule = module {
singleOf(::TestRepository)
}
This runs fine on 3.4.3, but on 3.5.0, Android Studio gives me an error when trying to build the app:
Unresolved reference: singleOf
Unresolved reference: module
The IDE does not show an error, it resolves the imports as expected.
To Reproduce Steps to reproduce the behavior:
- Create a file with the above module
- Use koin-android 3.5.0
- It should return an error as it does for me
Expected behavior No error when creating a module like the one above
Koin module and version:
koin-android:3.5.0
Today had the same situation, I had to import the Repository manually.
curious, did you upgrade to Kotlin 1.9 too?
I don't think so, I believe it's 1.4.31
Koin 3.5 is pulling Kotlin 1.9
koin 3.5.3 \ kotlin 1.9.22
Perhaps a solution would help someone
- roll back koin-core version to the previous one
- synchronize the project and rebuild
- reinstall the current version
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.