5

I'm facing an issue regarding Glide library.

I used couple of multiimagepicker API's from github but whenever i click for selecting image it crashes. every API crash because of this error

java.lang.NoSuchMethodError: No virtual method load(Ljava/lang/String;)Lcom/bumptech/glide/DrawableTypeRequest; in class Lcom/bumptech/glide/RequestManager; or its super classes (declaration of 'com.bumptech.glide.RequestManager' appears ...)

I'm badly stuck due to this error. i searched on glide forum but still no proper answer found. many looking for answer of this error

Build.gradle:

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })

    compile('com.mikepenz:aboutlibraries:5.9.7@aar') {
        transitive = true
        exclude group: 'com.android.support'
    }

    compile 'com.android.support:appcompat-v7:26.0.1'
    compile 'com.android.support:multidex:1.0.1'
    compile 'com.android.support:design:26.0.1'
    compile 'com.android.support:recyclerview-v7:26.0.1'
    compile 'com.android.support:cardview-v7:26.0.+'
    compile 'com.google.android.gms:play-services-auth:9.2.1'
    compile 'com.android.support.constraint:constraint-layout:1.0.2'
    compile 'com.android.volley:volley:1.0.0'
    compile 'com.github.lolucosmin:PermissionsWrapper:version_1.2'
    compile 'com.github.javiersantos:BottomDialogs:1.2.1'
    compile 'com.toptoche.searchablespinner:searchablespinnerlibrary:1.3.1'
    compile 'com.appyvet:materialrangebar:1.4'
    compile 'com.github.vivchar:ViewPagerIndicator:v1.0.1'
    compile 'com.github.bumptech.glide:glide:4.2.0'
    annotationProcessor 'com.github.bumptech.glide:compiler:4.2.0'
    compile 'com.github.chathuralakmal:AndroidImagePopup:1.2'
    compile 'com.ss.bannerslider:bannerslider:1.8.0'
    compile 'org.aviran.cookiebar2:cookiebar2:1.0.5'
    compile 'com.github.hamsaadev:RTLMaterialSpinner:V1.0.1'
    compile 'com.github.darsh2:MultipleImageSelect:v0.0.4'

}
13
  • add glide dependency into build.gradle Commented Nov 2, 2017 at 7:15
  • already added glide Commented Nov 2, 2017 at 7:16
  • show your build.gradle Commented Nov 2, 2017 at 7:19
  • 1
    use glide com.github.bumptech.glide:glide:3.8.0 as there is some major changes in latest glide 4.x Commented Nov 2, 2017 at 7:20
  • 1
    @MuhammadSaad use latest com.github.bumptech.glide:glide:4.3.0 Commented Nov 2, 2017 at 7:23

3 Answers 3

-1

I got the same error using the currently latest version: 4.7.1

The error is likely to cause because of your dependencies, to me, downgrading the Glide version to 4.3.1 worked fine.

    implementation'com.github.bumptech.glide:glide:4.3.1'

By the way, use the term implementation, rather than compile as it will be removed this year.

This solution might not work for you, because your version is already 4.2.0

But anyway, Hope it works!

Sign up to request clarification or add additional context in comments.

2 Comments

This is not helping me.
I got the same error using the currently latest version: 4.9.0 Downgrade to 4.7.1 worked!
-1

after migrating android to androidx and upgrading the gradle to newer version I had some problems with glide..

after trying version one by one... this version was the only one that works for me..

recommending on glide 4.8.0

with the newer and with the elders i had some problems.. maybe this version will works for you too..

implementation 'com.github.bumptech.glide:glide:4.8.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.8.0'
implementation 'com.android.support:support-annotations:28.0.0'
annotationProcessor 'com.android.support:support-annotations:28.0.0'

maybe you will find here some info that might help.. https://github.com/bumptech/glide/releases

1 Comment

The problem was not my gradle. It was library's problem. I downloaded the library and changed the library Glide's version!
-1

You are facing this error because MultipleImageSelect:v0.0.4 using old glide version and your project using newer version. When Gradle builds your project, It uses a newer version of Gradle and MultipleImageSelect:v0.0.4 will crash internally. You can confirm this in External libraries of project in android studio. Use same version of glide will solve this problem. Either downgrade your project's version of check latest version of MultipleImageSelect.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.