目录

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

目录

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的上下文即可