解决办法 在使用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();

            Glide.with(this).pauseRequest();

        }

子线程所有的this 都要写成getApplicationContext //这个主要针对于在子线程使用Glide

相关文章:

  • 2022-12-23
  • 2021-09-28
  • 2022-12-23
  • 2021-05-17
  • 2022-12-23
  • 2022-12-23
  • 2022-01-10
猜你喜欢
  • 2022-12-23
  • 2021-05-26
  • 2021-11-16
  • 2021-07-02
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案