You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 25, 2021. It is now read-only.
I get crash message :
java.lang.ClassCastException: com.github.irshulx.GlideRequests cannot be cast to com.my.app.GlideRequests at com.funliday.app.core.GlideApp.with(GlideApp.java:88)
And get some information:
Avoid AppGlideModule in libraries
Libraries must not include AppGlideModule implementations. Doing so will prevent any applications that depend on the library from managing their dependencies or configuring options like Glide’s cache sizes and locations.
In addition, if two libraries include AppGlideModules, applications will be unable to compile if they depend on both and will be forced to pick one or other other.
This does mean that libraries won’t be able to use Glide’s generated API, but loads with the standard RequestBuilder and RequestOptions will still work just fine (see the options page for examples).
from
http://bumptech.github.io/glide/doc/configuration.html#avoid-appglidemodule-in-libraries
And I found
Libraries
Libraries that do not register custom components do not need to perform any configuration steps and can skip the sections on this page entirely.
Libraries that do need to register a custom component, like a ModelLoader, can do the following:
Add one or more LibraryGlideModule implementations that register the new components.
Add the @GlideModule annotation to every LibraryGlideModule implementation
Add a dependency on Glide’s annotation processor.
An example LibraryGlideModule from Glide’s OkHttp integration library looks like this:
@GlideModule
public final class OkHttpLibraryGlideModule extends LibraryGlideModule {
@Override
public void registerComponents(Context context, Glide glide, Registry registry) {
registry.replace(GlideUrl.class, InputStream.class, new OkHttpUrlLoader.Factory());
}
}
Using the @GlideModule annotation requires a dependency on Glide’s annotations:
compile 'com.github.bumptech.glide:annotations:4.9.0'
from
http://bumptech.github.io/glide/doc/configuration.html#libraries
Dear irshuLx
Can you help me?
The text was updated successfully, but these errors were encountered:
I get crash message :
java.lang.ClassCastException: com.github.irshulx.GlideRequests cannot be cast to com.my.app.GlideRequests at com.funliday.app.core.GlideApp.with(GlideApp.java:88)
And get some information:
And I found
Dear irshuLx
Can you help me?
The text was updated successfully, but these errors were encountered: