bumptech/glide · critical · IllegalStateException
GeneratedAppGlideModuleImpl is implemented incorrectly. If y
Error message
GeneratedAppGlideModuleImpl is implemented incorrectly. If you've manually implemented this class, remove your implementation. The Annotation processor will generate a correct implementation.
What it means
Thrown by Glide.throwIncorrectGlideModule() when reflection fails to instantiate the generated GeneratedAppGlideModuleImpl (InstantiationException, IllegalAccessException, NoSuchMethodException, or InvocationTargetException). The generated class is missing, malformed, or its constructor threw, so Glide cannot complete initialization.
Source
Thrown at library/src/main/java/com/bumptech/glide/Glide.java:317
+ " annotationProcessor compile dependency on com.github.bumptech.glide:compiler"
+ " in your application and a @GlideModule annotated AppGlideModule implementation"
+ " or LibraryGlideModules will be silently ignored");
}
// These exceptions can't be squashed across all versions of Android.
} catch (InstantiationException e) {
throwIncorrectGlideModule(e);
} catch (IllegalAccessException e) {
throwIncorrectGlideModule(e);
} catch (NoSuchMethodException e) {
throwIncorrectGlideModule(e);
} catch (InvocationTargetException e) {
throwIncorrectGlideModule(e);
}
return result;
}
private static void throwIncorrectGlideModule(Exception e) {
throw new IllegalStateException(
"GeneratedAppGlideModuleImpl is implemented incorrectly."
+ " If you've manually implemented this class, remove your implementation. The"
+ " Annotation processor will generate a correct implementation.",
e);
}
@SuppressWarnings("PMD.UnusedFormalParameter")
Glide(
@NonNull Context context,
@NonNull Engine engine,
@NonNull MemoryCache memoryCache,
@NonNull BitmapPool bitmapPool,
@NonNull ArrayPool arrayPool,
@NonNull RequestManagerRetriever requestManagerRetriever,
@NonNull ConnectivityMonitorFactory connectivityMonitorFactory,
int logLevel,
@NonNull RequestOptionsFactory defaultRequestOptionsFactory,
@NonNull Map<Class<?>, TransitionOptions<?, ?>> defaultTransitionOptions,View on GitHub (pinned to eb14a895d8)
Solutions
- Ensure the Glide annotation processor is on the annotationProcessor/kapt/ksp configuration: annotationProcessor 'com.github.bumptech.glide:compiler:<version>'.
- Delete any hand-written GeneratedAppGlideModuleImpl class and let the processor generate it.
- Add keep rules for the generated class if using R8/ProGuard (the processor-generated classes should be kept).
- Align compiler and library versions to the same release.
- Inspect the cause exception (chained) to see whether a constructor or dependency failed, and fix the underlying error.
- Run a clean build to regenerate sources.
Example fix
// before
// no annotation processor, or a hand-written GeneratedAppGlideModuleImpl
dependencies {
implementation 'com.github.bumptech.glide:glide:4.16.0'
// processor missing
}
// after
dependencies {
implementation 'com.github.bumptech.glide:glide:4.16.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.16.0'
}
// and remove any manually created GeneratedAppGlideModuleImpl.java/.kt Defensive patterns
Strategy: validation
Validate before calling
// Ensure the annotation processor is configured and versions match.
dependencies {
val v = "4.16.0"
implementation("com.github.bumptech.glide:glide:$v")
annotationProcessor("com.github.bumptech.glide:compiler:$v")
}
// Confirm no hand-written GeneratedAppGlideModuleImpl exists. Prevention
- Always apply the Glide compiler with a matching version.
- Never hand-write GeneratedAppGlideModuleImpl.
- Add R8/ProGuard keep rules for generated Glide classes.
- Inspect the chained cause to locate the real failure.
When it happens
Trigger: getAnnotationGeneratedGlideModules() tries to reflectively load and construct com.bumptech.glide.GeneratedAppGlideModuleImpl; any of the listed reflection exceptions is funneled to throwIncorrectGlideModule().
Common situations: The Glide annotation processor (compiler) is not applied, so GeneratedAppGlideModuleImpl was never generated; someone hand-wrote a GeneratedAppGlideModuleImpl that does not match the expected constructor; R8/ProGuard obfuscated or removed the generated class; the AppGlideModule's constructor or a referenced component threw during instantiation; version mismatch between compiler and library.
Related errors
- Glide has been called recursively, this is probably an inter
- Cannot register already registered manager
- Cannot unregister not yet registered manager
- Log level must be one of Log.VERBOSE, Log.DEBUG, Log.INFO, L
- Failed to find result encoder for resource class: {}, you ma
AI-assisted analysis of bumptech/glide@eb14a895d8 (2026-08-14).
Data as JSON: /api/errors/860db76447807896.
Report an issue: GitHub.