Reputation: 733
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'
}
Upvotes: 5
Views: 12341
Reputation: 2383
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.
Upvotes: -1
Reputation: 189
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
Upvotes: -1
Reputation:
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!
Upvotes: -1