java.lang.RuntimeException: 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

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 Stack Overflow by user3560827
, 1 year ago
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
via Stack Overflow by akkie4396
, 2 years 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
via Stack Overflow by Siddhartha rao
, 1 year ago
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
via Stack Overflow by Unknown Code
, 1 year ago
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
via Stack Overflow by Haris Durrani
, 6 months ago
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
via Stack Overflow by kavya
, 10 months ago
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
java.lang.RuntimeException: 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
at android.app.Instrumentation.newActivity(Instrumentation.java:1065)

Users with the same issue

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

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