implementation 'com.github.bumptech.glide:glide:4.9.0'
最近在使用AndroidX包的项目中引用Glide(上面是版本,已经支持Androidx) 使用的时候报以下错误:
java.lang.NoSuchMethodError: No super method apply(Lcom/bumptech/glide/request/RequestOptions;)Lcom/bumptech/glide/request/RequestOptions; in class Lcom/bumptech/glide/request/RequestOptions; or its super classes (declaration of 'com.bumptech.glide.request.RequestOptions' appears in /data/app/com.yanjing.voice-2/base.apk:classes38.dex)
at com.jess.arms.http.imageloader.glide.GlideOptions.apply(GlideOptions.java:604)
at com.jess.arms.http.imageloader.glide.GlideRequests.setRequestOptions(GlideRequests.java:168)
找了好久才找到原因 : 项目中导入了其他引用Glide 低版本的库,删掉就好啦。
//svg image
implementation 'com.github.2coffees1team:GlideToVectorYou:v1.2.0'
所以使用androidx的时候 一定注意第三方库中是否已经做了适配!!!