我是靠谱客的博主 刻苦糖豆,这篇文章主要介绍Glide错误java.lang.IllegalArgumentException: You cannot start a load for a destr,现在分享给大家,希望可以做个参考。
解决办法 在使用Glide的那段代码加是否在主线程判断
if(Util.isOnMainThread()) {
Glide.with(ClassifyItemDetailActivity.this).load(ConstantsYiBaiSong.CLASSIFY_LIST_ITEM_DETAIL_IMAGE
+ lists.get(i).get(
"face"))
.diskCacheStrategy(DiskCacheStrategy.ALL).into(imageView);
}
在onDestory加
@Override
protected void onDestroy() {
super.onDestroy();
if(Util.isOnMainThread()) {
Glide.get(this).clearMemory();
}
}
问题解决。不要问我为什么 因为报错的根源都是判断结论不在主线程。
转自:http://www.ithao123.cn/content-10795739.html
最后
以上就是刻苦糖豆最近收集整理的关于Glide错误java.lang.IllegalArgumentException: You cannot start a load for a destr的全部内容,更多相关Glide错误java.lang.IllegalArgumentException:内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复