Someone has experience with Koin in a KMP project?...
# koin
p
Someone has experience with Koin in a KMP project? I'm following the tutorial here but it doesn't compile. It gives these errors: • Cannot access class 'org.koin.core.KoinApplication'. Check your module classpath for missing or conflicting dependencies. In both AndroidApp and DesktopApp modules calls to
Copy code
initKoin{}
m
Why don't you just have an AI (e.g., Claude Code) have a look at it? According to my experience AI nowadays solves such problems in less than a minute.
😁 1
p
hehe, I don't have claude subscription, I tried with copilot, chatgpt and gemini, none of them solved the issue. And also I prefeer human contact
imagine what will happen when no humans are helping other humans, who will train the AI?
on the other hand finally I solved the issue, but as I did a lot of work after that, I can't remember exactly the issue 😅, but I think the official KMP koin documentation was wrong, becase they told you to use impelentation() on the koin dependencies in commonMain, but you must use api() instead of implementation(), at least for the core dependency. If not, the other modules do not reach Koin dependencies.
the three AI I used yesterday for solve this where struck telling me to do a lot of things, but none of them was able to solve it. Probably because they are trained with the official documentation.
now some AI will read this conversation and will be trained with the real solution and will be able to solve it
human help, forums, chats are necessary
d
Maybe you did not include the dependency in all KMP modules ? iOS, Android, Server in the gradle build files / sections