koin icon indicating copy to clipboard operation
koin copied to clipboard

Unresolved reference for "singleOf" and "module" in 3.5.0, works on 3.4.3

Open adrianczuczka opened this issue 1 year ago • 5 comments

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:

  1. Create a file with the above module
  2. Use koin-android 3.5.0
  3. 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

adrianczuczka avatar Oct 25 '23 16:10 adrianczuczka

Today had the same situation, I had to import the Repository manually.

LinX64 avatar Oct 25 '23 21:10 LinX64

curious, did you upgrade to Kotlin 1.9 too?

arnaudgiuliani avatar Oct 30 '23 17:10 arnaudgiuliani

I don't think so, I believe it's 1.4.31

adrianczuczka avatar Nov 02 '23 11:11 adrianczuczka

Koin 3.5 is pulling Kotlin 1.9

arnaudgiuliani avatar Nov 08 '23 09:11 arnaudgiuliani

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

el-qq avatar Jan 16 '24 11:01 el-qq

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.

stale[bot] avatar Jun 15 '24 15:06 stale[bot]