“You must not call setTag() on a view Glide is targeting” 解决

报错原因大致是因为Glide加载的iamgeView调用了setTag()方法导致的错误,

因为Glide已经默认为ImageView设置的Tag。

解决办法:自定义一个Application,在里面加上

public class App extends Application {
    @Override public void onCreate() {
        super.onCreate();
        ViewTarget.setTagId(R.id.glide_tag);
    }
}

然后在/values/ids.xml加上

然后在/values/ids.xml加上

 

你可能感兴趣的:(“You must not call setTag() on a view Glide is targeting” 解决)