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

GitHub | e16din | 7 months ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    GitHub comment 191#235949465

    GitHub | 7 months ago | e16din
    java.lang.ClassCastException: android.view.ContextThemeWrapper cannot be cast to android.app.Activity

    Root Cause Analysis

    1. java.lang.ClassCastException

      android.view.ContextThemeWrapper cannot be cast to android.app.Activity

      at fm.jiecao.jcvideoplayer_lib.JCVideoPlayer.prepareVideo()
    2. fm.jiecao.jcvideoplayer_lib
      JCVideoPlayer$1.onClick
      1. fm.jiecao.jcvideoplayer_lib.JCVideoPlayer.prepareVideo(JCVideoPlayer.java:294)
      2. fm.jiecao.jcvideoplayer_lib.JCVideoPlayer.startButtonLogic(JCVideoPlayer.java:281)
      3. fm.jiecao.jcvideoplayer_lib.JCVideoPlayer.access$000(JCVideoPlayer.java:38)
      4. fm.jiecao.jcvideoplayer_lib.JCVideoPlayer$1.onClick(JCVideoPlayer.java:209)
      4 frames
    3. Android
      AlertController$ButtonHandler.handleMessage
      1. com.android.internal.app.AlertController$ButtonHandler.handleMessage(AlertController.java:164)
      1 frame
    4. Android Platform
      ActivityThread.main
      1. android.os.Handler.dispatchMessage(Handler.java:102)
      2. android.os.Looper.loop(Looper.java:135)
      3. android.app.ActivityThread.main(ActivityThread.java:5289)
      3 frames
    5. Java RT
      Method.invoke
      1. java.lang.reflect.Method.invoke(Native Method)
      2. java.lang.reflect.Method.invoke(Method.java:372)
      2 frames
    6. Android
      ZygoteInit.main
      1. com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:898)
      2. com.android.internal.os.ZygoteInit.main(ZygoteInit.java:693)
      2 frames