Android问题:android.graphics.drawable.TransitionDrawable cannot be cast to android.graph

我出现这个错误的原因是

在使用自定义的ImageView时,定义的图片格式是bitmap,

但是Glide解析的图片格式不对直接放到了image里面,然后在into前面加一个asBitmap()就可以解决了

Glide.with(context).load(url).asBitmap().into(img);

记下来,有问题的同学可以快速解决!

猜你喜欢

转载自blog.csdn.net/pengbo6665631/article/details/80508953