Glide Error - You cannot start a load for a destroyed activity
Glide 관련 된 처음보는 오류가 발생했다. You cannot start a load for a destroyed activity 다행히(?) 예전에 이슈가 된 에러였다.(https://github.com/bumptech/glide/issues/803) 이런 에러가 발생한 이유는 with() 함수가 lifecycle을 따르기 때문이다. 즉 Glide가 이미지가 로드 중 Glide.with()의 with()에 들어간 인자가 “activity 또는 fragment가 destroyed"되면서 영향을 받게 되고 위의 에러가 발생한 것으로 보입니다. 스택오버플로우에서 제안하는 방법으로는 아래와 같이 RequestManager를 변수에 담아주고 사용하는 것이다. class MyAdapter extends WhichEveryOneYouUse { private final RequestManager glide; MyAdapter(RequestManager glide, ...) { this.glide = glide; ... } void getView/onBindViewHolder(... int position) { // ... holder magic, and get current item for position glide.load... or even loadImage(glide, item.url, holder.image); } } loadImage(Glide.with(this), url, findViewById(R.id.image)); // or list.setAdapter(new MyAdapter(Glide.with(this), data)); Reference ...