java.lang.ClassCastException: android.view.ContextThemeWrapper cannot be cast to android.app.Activity

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Solutions on the web

via GitHub by e16din
, 1 year ago
android.view.ContextThemeWrapper cannot be cast to android.app.Activity
via GitHub by prashanthd
, 1 year ago
android.view.ContextThemeWrapper cannot be cast to android.app.Activity
via GitHub by keepfit
, 2 months ago
android.view.ContextThemeWrapper cannot be cast to android.app.Activity
via GitHub by keepfit
, 1 year ago
android.view.ContextThemeWrapper cannot be cast to android.app.Activity
java.lang.ClassCastException: android.view.ContextThemeWrapper cannot be cast to android.app.Activity
at fm.jiecao.jcvideoplayer_lib.JCVideoPlayer.prepareVideo(JCVideoPlayer.java:294)
at fm.jiecao.jcvideoplayer_lib.JCVideoPlayer.startButtonLogic(JCVideoPlayer.java:281)
at fm.jiecao.jcvideoplayer_lib.JCVideoPlayer.access$000(JCVideoPlayer.java:38)
at fm.jiecao.jcvideoplayer_lib.JCVideoPlayer$1.onClick(JCVideoPlayer.java:209)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5289)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:898)

Users with the same issue

You are the first who have seen this exception. Write a tip to help other users and build your expert profile.

Know the solutions? Share your knowledge to help other developers to debug faster.