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 web

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
via Stack Overflow by akkie4396
, 1 year ago
Unable to instantiate activity ComponentInfo{com.pixalstudio.navigationdrawer/com.pixalstudio.navigationdrawer.LocationSelection}: java.lang.ClassCastException: com.pixalstudio.navigationdrawer.LocationSelection cannot be cast to android.app.Activity

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

Solution icon of stackoverflow
Unable to instantiate activity ComponentInfo{technologies.mirage.prigovdirectory/technologies.mirage.prigovdirectory.MinNumResults.MySearchableActivity}: java.lang.ClassCastException: technologies.mirage.prigovdirectory.MinNumResults.MySearchableActivity cannot be cast to android.app.Activity

Solution icon of stackoverflow
via Stack Overflow by topher
, 6 months ago
Unable to instantiate activity ComponentInfo{com.example.jackreynaldo.tab/com.example.jackreynaldo.tab.no}: java.lang.ClassCastException: com.example.jackreynaldo.tab.no cannot be cast to android.app.Activity

Solution icon of stackoverflow
Unable to instantiate activity ComponentInfo{info.academypk.parentsportal/info.academypk.parentsportal.ContactActivity}: java.lang.ClassCastException: info.academypk.parentsportal.ContactActivity cannot be cast to android.app.Activity

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

Solution icon of github
via GitHub by Berlon
, 1 year ago
Unable to start activity ComponentInfo{com.rdvejuicecalculator.and.debug/com.rdvejuicecalculator.and.CustomContainerActivity}: java.lang.ClassCastException: com.rdvejuicecalculator.and.CustomApplication cannot be cast to com.rdvejuicecalculator.and.GoogleAnalyticsApp

Solution icon of stackoverflow
Unable to start activity ComponentInfo{com.h2o/com.h2o.AccountActivity}: java.lang.ClassCastException: com.h2o.AccountActivity cannot be cast to com.h2o.MainActivity

Solution icon of stackoverflow
Unable to start activity ComponentInfo{com.pcphoneconnections.threeandout/com.pcphoneconnections.threeandout.SettingsActivity}: java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Boolean

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