Search code examples
androidgradlekoinjitpack

Koin can't create instance of class from published library


In my android app, I had a module labelled base. Inside base were a couple classes which acted as base lifecycle classes(Controller, ViewModel, etc.). My app was working just fine with these class local inside my project. I decided to move those out into their own library so that they could be reused on future projects. So I've published my library via jitpack and now add that library as a dependency in my gradle file.

My issue is that now it seems like all the code has been obfuscated and Koin cannot find definitions for my ViewModel classes. For example, the error I get it

Caused by: h.a.c.f.e: No definition found for 'c.c.a' has been found. Check your module definitions.

I'm using ViewModel{} block to inject my view models in my koin modules but no I don't even know what classes it can not find definitions for because all the code has been obfuscated. Has anyone encountered this and can point me in right direction? The only change I made was delete the local files and publish those files to a library which I now have as a dependency.


Solution

  • The problem resolved itself, I have no idea how or why. I created a new release on my github and used that version and Wa-Lah.