Glide 4.10.0 : java.lang.IllegalStateException: GeneratedAppGlideModuleImpl is implemented incorrectly
First thing:
Have you changed annotationProcessor
dependency:
implementation 'com.github.bumptech.glide:glide:4.10.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.10.0'
Second things:
Have you added proguard rules as follow:
-keep public class * implements com.bumptech.glide.module.GlideModule
-keep public class * extends com.bumptech.glide.module.AppGlideModule
-keep public enum com.bumptech.glide.load.ImageHeaderParser$** {
**[] $VALUES;
public *;
}
Hope it will helps you. Thank you.
In my case, this bug happened when I tried to show a Google Map in my app.
Specifically google-map-v3-beta
SDK.
It looks like the SDK contains an obfuscated version of Glide that breaks when the app also uses Glide and the final AndroidManifest.xml contains a meta-data element called "GlideModule".
There is an issue for that in the google tracker: https://issuetracker.google.com/issues/132323222
Solution for me was to switch back to maps v2.
I faced similar issue with my apps. I upgraded Glide library from 4.9.0 to 4.11.0.
Before:
implementation 'com.github.bumptech.glide:glide:4.11.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.9.0'
implementation ('com.github.bumptech.glide:okhttp3-integration:4.9.0'){
exclude group: 'glide-parent'
}
After:
implementation 'com.github.bumptech.glide:glide:4.11.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.11.0'
implementation ('com.github.bumptech.glide:okhttp3-integration:4.11.0'){
exclude group: 'glide-parent'
}
That fixed the problem.