java.lang.IllegalArgumentException: You must not call setTag() on a view Glide is targeting
来源:互联网 发布:网络安全法 国家战略 编辑:程序博客网 时间:2024/05/21 06:50
java.lang.IllegalArgumentException: You must not call setTag() on a view Glide is targeting 错误处理
问题描述
这个错误是使用Glide3.6.0+ 版本出现的,因为从Glide3.6.0开始对setTag进行处理。如果你使用3.5.2版本不会出现这样的问题。
使用recycleview展示数据,并在recycleview适配器的onBindViewHolder()方法中对item做监听处理,使用 holder.goods_main_img.setTag(holder.getLayoutPosition());语句 刷新recycleview出现闪退现象。
解决问题
- 在总配置文件(manifest.xml)下添加如下文件
<application android:name=".App"
- 创建一个同下的类
public class App extends Application { @Override public void onCreate() { super.onCreate(); ViewTarget.setTagId(R.id.glide_tag); }}
- 在src/main/values/ids.xml:路径下创建一个如下的配置文件
<resources> <item type="id" name="glide_tag" /></resources>
- 重新运行一遍,你会发现问题解决。
阅读全文
1 0
- java.lang.IllegalArgumentException: You must not call setTag() on a view Glide is targeting
- java.lang.IllegalArgumentException: You must not call setTag() on a view Glide is targeting
- Glide异常:java.lang.IllegaliArgumentException:You must not call setTag() on a view Glide is targeting
- Error “You must not call setTag() on a view Glide is targeting” when use Glide
- Glide Exception:"You must not call setTag() on a view Glide is targeting"
- You must not call setTag() on a view Glide is targeting的解决方案
- You must not call setTag() on a view Glide is targeting
- You must not call setTag() on a view Glide is targeting的解决方案
- 关于You must not call setTag() on a view Glide is targeting错误处理
- Glide加载图片遇到的错误:You must not call setTag() on a view Glide is targeting
- Gilde刷新图片闪烁和You must not call setTag() on a view Glide is targeting如何解决
- java.lang.IllegalArgumentException: You cannot start a load on a fragment before it is attached
- java.lang.IllegalArgumentException: You cannot start a load on a fragment before it is attached
- java.lang.illegalargumentexception view android.widget.listview is not a sliding drawer
- 【一】Glide错误java.lang.IllegalArgumentException: You cannot start a load for a destroyed activity
- Glide错误java.lang.IllegalArgumentException: You cannot start a load for a destr
- Glide错误java.lang.IllegalArgumentException: You cannot start a load for a destroyed activity
- Glide错误java.lang.IllegalArgumentException: You cannot start a load for a destroyed activity
- tensorflow 中import prettytensor 出错
- URL encode
- 0722集合
- 在myeclipse中点击 deploy 旋钮,在弹出的Project Deployments筐中看不到刚导入的项目,无法部署
- Mybatis插入操作 主键自增 返回成功 但是数据库没有数据
- java.lang.IllegalArgumentException: You must not call setTag() on a view Glide is targeting
- svn常见问题,报错,命令。
- [容易] UVa OJ 120 Stacks of flapjacks
- 网址记录
- UWA发布 | 2017 Unity手游体检蓝皮书 — MOBA篇
- redis分布式锁
- 前端面试题
- Hanoi塔问题
- 【★】KMP算法完整教程