Glide: CheckResult and NoNull for AndroidX

Created on 10 Jul 2019  路  4Comments  路  Source: bumptech/glide

Error:

symbol:   class NonNull
  location: class GeneratedAppGlideModuleImpl
com/bumptech/glide/GeneratedAppGlideModuleImpl.java:41: error: cannot find symbol
  @NonNull
   ^

They need this Libraries to work:

import androidx.annotation.CheckResult;
import androidx.annotation.NonNull;

With:

implementation 'com.github.bumptech.glide:glide:4.9.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.9.0'
stale

Most helpful comment

try this :

annotationProcessor 'com.github.bumptech.glide:compiler:4.9.0'
implementation 'com.github.bumptech.glide:glide:4.9.0'
annotationProcessor 'androidx.annotation:annotation:1.1.0'

if the problem still present try to exclude annotation

 implementation('com.github.bumptech.glide:glide:4.9.0') {
        exclude group: 'androidx.annotation'
    }

All 4 comments

try this :

annotationProcessor 'com.github.bumptech.glide:compiler:4.9.0'
implementation 'com.github.bumptech.glide:glide:4.9.0'
annotationProcessor 'androidx.annotation:annotation:1.1.0'

if the problem still present try to exclude annotation

 implementation('com.github.bumptech.glide:glide:4.9.0') {
        exclude group: 'androidx.annotation'
    }

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.

I'm having this same issue, but only under certain conditions the compiler will fail.

I think these are the relevant parts from my gradle file. I added some stuff based on some comments:

compileSdkVersion 29
buildToolsVersion '29.0.1'
.
.
minSdkVersion 21
targetSdkVersion 29
.
.
implementation 'androidx.appcompat:appcompat:1.0.2'
annotationProcessor 'com.github.bumptech.glide:compiler:4.9.0'
implementation("com.github.bumptech.glide:glide:4.9.0") {
        exclude group: 'com.android.support'
        exclude group: 'androidx.annotation'
}
implementation "androidx.annotation:annotation:1.1.0"
implementation "com.github.bumptech.glide:okhttp3-integration:4.9.0"

The problem started when I added these two classes:

https://gist.github.com/Johnnyne/433b9458593c62df4e6d83f9377be66b
https://gist.github.com/Johnnyne/cd16619a9d1728949891c9fe13017bd8

Which are supposed to add support for a progress listener, which I need for my project. This was discussed here:

https://github.com/bumptech/glide/issues/232

If I add the ProgressAppGlideModule class that extends from AppGlideModule and override registerComponents class, then it causes the build issue.

I guess is somehow related to the @GlideModule annotation or something.

Any ideas?

try this :

annotationProcessor 'com.github.bumptech.glide:compiler:4.9.0'
implementation 'com.github.bumptech.glide:glide:4.9.0'
annotationProcessor 'androidx.annotation:annotation:1.1.0'

if the problem still present try to exclude annotation

 implementation('com.github.bumptech.glide:glide:4.9.0') {
        exclude group: 'androidx.annotation'
    }

It works for me.. thanks

Was this page helpful?
0 / 5 - 0 ratings