java.lang.RuntimeException

Unable to instantiate activity ComponentInfo{com.example.pmap.wifitoast/com.example.pmap.wifitoast.MainActivity}: java.lang.ClassCastException: com.example.pmap.wifitoast.MainActivity cannot be cast to android.app.Activity


Solutions on the web40878

Solution icon of stackoverflow
Unable to instantiate activity ComponentInfo{com.example.pmap.wifitoast/com.example.pmap.wifitoast.MainActivity}: java.lang.ClassCastException: com.example.pmap.wifitoast.MainActivity cannot be cast to android.app.Activity

Solution icon of stackoverflow
Unable to instantiate activity ComponentInfo{org.example.sudoku/org.example.sudoku.Prefs}: java.lang.ClassCastException: org.example.sudoku.Prefs cannot be cast to android.app.Activity

Solution icon of stackoverflow
via Stack Overflow by user1493891
, 1 year ago
Unable to instantiate activity ComponentInfo{com.warzone.livewallpaper/com.warzone.livewallpaper.LiveActivity}:java.lang.ClassCastException: com.warzone.livewallpaper.LiveActivity cannot be cast to android.app.Activity

Solution icon of stackoverflow
Unable to instantiate activity ComponentInfo{com.proteintracker/com.proteintracker.MainPreferenceActivity}: java.lang.ClassCastException: com.proteintracker.MainPreferenceActivity cannot be cast to android.app.Activity

Solution icon of stackoverflow
Unable to instantiate activity ComponentInfo{trade.ly.tradely/trade.ly.tradely.PostPhotosActivity}: java.lang.ClassCastException: trade.ly.tradely.PostPhotosActivity cannot be cast to android.app.Activity

Solution icon of stackoverflow
Unable to instantiate activity ComponentInfo{com.example.listprueba/com.example.listprueba.MainActivity}: java.lang.ClassCastException: com.example.listprueba.MainActivity cannot be cast to android.app.Activity

Solution icon of stackoverflow
via Stack Overflow by user3740607
, 1 year ago
Unable to instantiate activity ComponentInfo{com.genie_alpha/com.genie_alpha.Categories_vehicles}: java.lang.ClassCastException: com.genie_alpha.Categories_vehicles cannot be cast to android.app.Activity

Solution icon of stackoverflow
via Stack Overflow by MrWiggles
, 1 year ago
Unable to instantiate activity ComponentInfo{com.example.assignment5/com.example.assignment5.ListActivityFragment}: java.lang.ClassCastException: com.example.assignment5.ListActivityFragment cannot be cast to android.app.Activity

Solution icon of stackoverflow
Unable to instantiate activity ComponentInfo{com.example.lockscreen/com.example.lockscreen.LockMainActivity}: java.lang.ClassCastException: com.example.lockscreen.LockMainActivity cannot be cast to android.app.Activity

Solution icon of stackoverflow
via Stack Overflow by Matclick
, 1 year ago
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

Stack trace

  • java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.example.pmap.wifitoast/com.example.pmap.wifitoast.MainActivity}: java.lang.ClassCastException: com.example.pmap.wifitoast.MainActivity cannot be cast to android.app.Activity at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2250) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2413) at android.app.ActivityThread.access$800(ActivityThread.java:155) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1317) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:135) at android.app.ActivityThread.main(ActivityThread.java:5343) 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:905) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:700) Caused by: java.lang.ClassCastException: com.example.pmap.wifitoast.MainActivity cannot be cast to android.app.Activity at android.app.Instrumentation.newActivity(Instrumentation.java:1089) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2240) ... 10 more

Write tip

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

Users with the same issue

21 times, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 2 years ago