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

你可能感兴趣的:(android,异常)