“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加上

  ,如需转载请自行联系原作者	
相关文章
|
5月前
|
API Android开发
as报错:Exception raised during rendering: com/android/util/PropertiesMap (Details)
as报错:Exception raised during rendering: com/android/util/PropertiesMap (Details)
38 0
|
Android开发
Android MediaPlayer 播放prepareAsync called in state 8解决办法
Android MediaPlayer 播放prepareAsync called in state 8解决办法
284 0
|
Android开发
DSL element ‘android.dataBinding.enabled‘ is obsolete and has been replaced with ‘android.buildFeatu
DSL element ‘android.dataBinding.enabled‘ is obsolete and has been replaced with ‘android.buildFeatu
222 0
|
Java
Could not find class 'android.support.v4.view.ViewPager', referenced from method***
Could not find class 'android.support.v4.view.ViewPager', referenced from method***
164 0
Could not find class 'android.support.v4.view.ViewPager', referenced from method***
|
Kotlin
【错误记录】布局组件加载错误 ( Attempt to invoke virtual method ‘xxx$Callback android.view.Window.getCallback()‘ )
【错误记录】布局组件加载错误 ( Attempt to invoke virtual method ‘xxx$Callback android.view.Window.getCallback()‘ )
319 0
|
Android开发
android8.0采坑 Only fullscreen opaque activities can request orientation
android8.0采坑 Only fullscreen opaque activities can request orientation 也就是说只有全屏不透明的activity才可以设置方向,既然知道问题所在就好办了。
3038 0

热门文章

最新文章