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


Solutions on the web17682

Solution icon of stackoverflow
via Stack Overflow by hamster
, 9 months ago
Unable to instantiate activity ComponentInfo{com.example.adi.fragment2/com.example.adi.fragment2.MainActivity}: java.lang.ClassCastException: com.example.adi.fragment2.MainActivity cannot be cast to android.app.Activity

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

Solution icon of stackoverflow
via Stack Overflow by Nikolai
, 1 year ago
Unable to instantiate activity ComponentInfo{htgroup.welcome.voiceapp/htgroup.welcome.voiceapp.MainActivity}: java.lang.ClassCastException: htgroup.welcome.voiceapp.MainActivity cannot be cast to android.app.Activity

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

Solution icon of github
Unable to instantiate activity ComponentInfo{com.flaredown.flaredownApp.DEBUG/com.flaredown.flaredownApp.Checkin.CheckinFragment}: java.lang.ClassCastException: com.flaredown.flaredownApp.Checkin.CheckinFragment cannot be cast to android.app.Activity

Solution icon of stackoverflow
via Stack Overflow by Mahesh N
, 10 months ago
Unable to instantiate activity ComponentInfo{com.example.android.googleplaceswebservice/com.example.android.googleplaceswebservice.GooglePlaces}: java.lang.ClassCastException: com.example.android.googleplaceswebservice.GooglePlaces cannot be cast to android.app.Activity

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

Solution icon of stackoverflow
via Stack Overflow by rex
, 8 months ago
Unable to instantiate activity ComponentInfo{com.example.intawebapp/com.example.intawebapp.activity.AboutUsActivity}: java.lang.ClassCastException: com.example.intawebapp.activity.AboutUsActivity cannot be cast to android.app.Activity

Solution icon of stackoverflow
Unable to start activity ComponentInfo{co5025.example.com.week10/co5025.example.com.week10.MainActivity}: java.lang.ClassCastException: android.support.v7.widget.AppCompatEditText cannot be cast to android.widget.Button

Solution icon of github
Unable to start activity ComponentInfo{com.mattikettu.pinkiponki/com.mattikettu.pinkiponki.RegisterActivity}: java.lang.ClassCastException: android.support.v7.widget.AppCompatTextView cannot be cast to android.app.Activity

Stack trace

java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.example.adi.fragment2/com.example.adi.fragment2.MainActivity}: java.lang.ClassCastException: com.example.adi.fragment2.MainActivity cannot be cast to android.app.Activity
	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2548)
	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2707)

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

33 times, 1 week ago
Samebug visitor profile picture
Unknown user
Once, 2 weeks ago
Samebug visitor profile picture
Unknown user
Once, 3 weeks ago
Samebug visitor profile picture
Unknown user
Once, 3 weeks ago
8 times, 4 weeks ago
109 more bugmates