Glide java.lang.NoSuchMethodError:没有虚拟方法 [英] Glide java.lang.NoSuchMethodError: No virtual method
问题描述
我遇到有关Glide
库的问题.
我使用了几个来自github的multiimagepicker
API
但是每当我click
选择图像时
它崩溃了.
每次API
因此错误而崩溃
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:没有虚拟方法 加载(Ljava/lang/String;)Lcom/bumptech/glide/DrawableTypeRequest;在 Lcom/bumptech/glide/RequestManager类;或它的超类 (出现"com.bumptech.glide.RequestManager"的声明...)
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:
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'
}
推荐答案
使用最新版本的我遇到了相同的错误:4.7.1
I got the same error using the currently latest version: 4.7.1
该错误很可能是由于您的依赖性导致的,对我来说,将Glide版本降级到4.3.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'
顺便说一句,请使用术语implementation
,而不是compile
,因为它将在今年被删除.
By the way, use the term implementation
, rather than compile
as it will be removed this year.
此解决方案可能不适用于您,因为您的版本已经是 4.2.0
This solution might not work for you, because your version is already 4.2.0
但是无论如何,希望它能起作用!
But anyway, Hope it works!
这篇关于Glide java.lang.NoSuchMethodError:没有虚拟方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!