I'm hoping someone has run into this before and its just an easy setting that i'm missing. Basically i've built a Kotlin Library that uses Glide, and uses dagger to set up my glide instance in that library. This library by itself, and in a dummy app works perfect, no issues.
I have an old Java project that i'm testing out using this library in. Everything seems ok except when I hit the screen with the Glide functionality. Glide is being used in both the App and the Library and they seem to be colliding.
This is the error:
java.lang.ClassCastException: appPackage1.Utilities.GlideRequests cannot be cast to appPackage2.di.module.GlideRequests
at appPackage2.di.module.GlideApp.with(GlideApp.java:88)
In the old Java Application Glide exists as:
@GlideModule
public final class MyAppGlideModule extends AppGlideModule {}
In my Kotlin Library Glide exists as:
@GlideModule
class AppGlideModule : AppGlideModule()
And it throws the error when it is called like below from my library:
GlideApp.with(requireContext()).load