-
Notifications
You must be signed in to change notification settings - Fork 6.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Kotlin/kapt - Glide: Failed to find GeneratedAppGlideModule #2817
Comments
Sounds like another duplicate of #1939. Are you able to use the generated API? If so, does the app crash? |
From what i've read in #1939, people were missing includes or didn't follow the setup instructions. Like I said, the classes seem to be generated correctly by kapt cause I can see them and browse them. I'm also using GlideApp APIs throughout the app without problems. And, the code that triggers the warning is looking for a class that seems to be generated correctly: try {
Class<GeneratedAppGlideModule> clazz =
(Class<GeneratedAppGlideModule>)
Class.forName("com.bumptech.glide.GeneratedAppGlideModuleImpl");
result = clazz.getDeclaredConstructor().newInstance();
} catch (ClassNotFoundException e) {
if (Log.isLoggable(TAG, Log.WARN)) {
Log.w(TAG, "Failed to find GeneratedAppGlideModule. You should include an"
+ " annotationProcessor compile dependency on com.github.bumptech.glide:compiler"
+ " in your application and a @GlideModule annotated AppGlideModule implementation or"
+ " LibraryGlideModules will be silently ignored");
}
} |
If you're able to reproduce this in a sample app, I'm happy to take a look. Otherwise, if you can use the generated API in your app and it doesn't crash, it's unlikely that the method in question is actually failing. There's some casting that will throw if that happens. Can you provide your Glide load line? |
I just tried to put on a sample app that reproduces the issue, and after adding one library at a time to reproduce my actual app configuration, I found out the culprit: Intercom library (https://github.com/intercom/intercom-android). I know they use a repackaged version of Glide in their library, I'll check their repo to see if I can find something. Thanks. Feel free to close the issue, because I presume it is more an issue with intercom! |
Awesome thanks for investigating. Let me know if you find anything. We may be able to make the error message more useful, like include the package name of the class we tried to load, which would make repackaging at least clearer (if they change the class package names). |
This issue has been automatically marked as stale because it has not had activity in the last seven days. It will be closed if no further activity occurs within the next seven days. Thank you for your contributions. |
Glide Version: 4.5.0
Integration libraries: okhttp3-integration
Device/Android Version: doesn't seem device related. The warning shows on emulators and every test devices I have.
Issue details / Repro steps / Use case background:
I followed the setup instructions. Glide is working as expected in my app, but i'm getting this warning in logcat, which shouldn't be there since my setup seems correct.
I'm using kotlin. kapt plugin is applied at the top of my build.gradle file:
and I also have this
I have created a class extending AppGlideModule
kapt seems to generate the
GlideApp
,GlideOptions
,GlideRequest
,GlideRequests
,GeneratedAppGlideModuleImpl
andGeneratedRequestManagerFactory
classes correctly. I can see them.The text was updated successfully, but these errors were encountered: