加载 svg 格式照片时出现错误:
No static method buildStreamModelLoader(Ljava/lang/Class;Landroid/content/Context;)Lcom/bumptech/glide/load/model/ModelLoader; in class Lcom/bumptech/glide/Glide; or its super classes (declaration of 'com.bumptech.glide.Glide' appears in /data/app/ir.vian_web.pezeshkyab-lCn-nMRSyq-17dH9hkz8bA==/split_lib_dependencies_apk.apk)
我使用了 lib SvgLoader :
@Override
public void onBindViewHolder(ViewHolder holder, int position) {
Cats cats = list.get(position);
holder.txt_title.setText(cats.getTitle());
SvgLoader.pluck().with((Activity) context).load(cats.getImage(),holder.image);
还有我的 gradle :
android {
compileSdkVersion 28
defaultConfig {
applicationId "ir.vian_web.pezeshkyab"
minSdkVersion 17
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
}
使用实现(“com.github.bumptech.glide:glide:3.8.0”)将解决问题