java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.example.alarmclocktext/com.example.alarmclocktext.Dialog}: java.lang.ClassCastException: com.example.alarmclocktext.Dialog cannot be cast to android.app.Activity

Stack Overflow | rockers | 8 months ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    Error in Starting Dialog from Notification

    Stack Overflow | 8 months ago | rockers
    java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.example.alarmclocktext/com.example.alarmclocktext.Dialog}: java.lang.ClassCastException: com.example.alarmclocktext.Dialog cannot be cast to android.app.Activity
  2. 0

    cannot be cast to android.app.activity

    Stack Overflow | 2 years ago | Matclick
    java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.otticafotobenzi/com.otticafotobenzi.rss.RssService}: java.lang.ClassCastException: com.otticafotobenzi.rss.RssService cannot be cast to android.app.Activity
  3. 0

    How to start activity when a link is clicked in webview?

    Stack Overflow | 2 years ago | Anshul Khare
    java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.apks.mumbaifashion/com.apks.mumbaifashion.MainActivity2}: java.lang.ClassCastException: com.apks.mumbaifashion.MainActivity2 cannot be cast to android.app.Activity
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    cannot be cast to android.app.activity - TecHub

    theplayhub.com | 1 year ago
    java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.otticafotobenzi/com.otticafotobenzi.rss.RssService}: java.lang.ClassCastException: com.otticafotobenzi.rss.RssService cannot be cast to android.app.Activity
  6. 0

    Why is DialogFragment.onCreateView called when Activity is being Destroyed?

    Stack Overflow | 4 years ago | WindsurferOak
    java.lang.RuntimeException: Unable to destroy activity {com.myapp/com.myapp.activity.FirstFragment}: java.lang.NullPointerException

  1. andreeaa marin 8 times, last 3 weeks ago
  2. rp 1 times, last 4 months ago
  3. Indri Yunita 320 times, last 2 days ago
  4. bmacedo 1 times, last 5 months ago
  5. VeryRedChris 23 times, last 6 months ago
48 more registered users
47 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.lang.ClassCastException

    com.example.alarmclocktext.Dialog cannot be cast to android.app.Activity

    at android.app.Instrumentation.newActivity()
  2. Android Platform
    ActivityThread.main
    1. android.app.Instrumentation.newActivity(Instrumentation.java:1061)
    2. android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2101)
    3. android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2233)
    4. android.app.ActivityThread.access$800(ActivityThread.java:135)
    5. android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
    6. android.os.Handler.dispatchMessage(Handler.java:102)
    7. android.os.Looper.loop(Looper.java:136)
    8. android.app.ActivityThread.main(ActivityThread.java:5001)
    8 frames
  3. Java RT
    Method.invoke
    1. java.lang.reflect.Method.invokeNative(Native Method)
    2. java.lang.reflect.Method.invoke(Method.java:515)
    2 frames
  4. Android
    ZygoteInit.main
    1. com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785)
    2. com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)
    2 frames
  5. Android Platform
    NativeStart.main
    1. dalvik.system.NativeStart.main(Native Method)
    1 frame