koral-- / android-gif-drawable

Views and Drawable for displaying animated GIFs on Android
Other
9.51k stars 1.78k forks source link

android.graphics.drawable.BitmapDrawable cannot be cast to pl.droidsonroids.gif.b Exception #794

Closed IRonMaxTech closed 1 year ago

IRonMaxTech commented 2 years ago

Fatal Exception: java.lang.RuntimeException: Unable to resume activity {scooltr/com.example.scooltr.MainChooserActivity}: java.lang.ClassCastException: android.graphics.drawable.BitmapDrawable cannot be cast to pl.droidsonroids.gif.b at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3107) at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3138) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2481) at android.app.ActivityThread.-wrap11(ActivityThread.java) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:148) at android.app.ActivityThread.main(ActivityThread.java:5421) at java.lang.reflect.Method.invoke(Method.java) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)

koral-- commented 2 years ago

You have to post a code reproducing this issue.

koral-- commented 1 year ago

Closing due to inactivity

KananTaghili commented 3 months ago

May be image resource is not .gif file, .png can not cast to GifDrawable