Glide error cannot be cast to com.bumptech.glide.manager.RequestManagerFragment

  发布日期:   2018-08-09
  最新修改:   2020-03-14
  阅读次数:   293 次

java.lang.ClassCastException: com.bumptech.glide.manager.RequestManagerFragment cannot be cast to com.bumptech.glide.manager.RequestManagerFragment at com.bumptech.glide.manager.RequestManagerRetriever.getRequestManagerFragment(RequestManagerRetriever.java:153) at com.bumptech.glide.manager.RequestManagerRetriever.fragmentGet(RequestManagerRetriever.java:168) at com.bumptech.glide.manager.RequestManagerRetriever.get(RequestManagerRetriever.java:127) at com.bumptech.glide.Glide.with(Glide.java:641) .... at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:158) at android.app.ActivityThread.main(ActivityThread.java:7225) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)

  • 将上下文换成Application的上下文即可

   转载规则

《Glide error cannot be cast to com.bumptech.glide.manager.RequestManagerFragment字》GajAngels 采用 知识共享署名-非商业性使用 4.0 国际许可协议 进行许可。