java.lang.RuntimeException

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


Solutions on the web41996

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 stackoverflow
Unable to start activity ComponentInfo{ca.mohawk.you.lab3/ca.mohawk.you.lab3.MainActivity}: java.lang.ClassCastException: android.widget.Button cannot be cast to android.widget.NumberPicker

Solution icon of stackoverflow
Unable to start activity ComponentInfo{com.example.activity2/com.example.activity2.MainActivity}: java.lang.ClassCastException: android.widget.Button cannot be cast to android.widget.EditText

Solution icon of stackoverflow
via Stack Overflow by Unknown author, 1 year ago
Unable to start activity ComponentInfo{com.example.triptych4/com.example.triptych4.MainActivity}: java.lang.ClassCastException: android.widget.ImageButton cannot be cast to android.widget.Button

Solution icon of stackoverflow
Unable to start activity ComponentInfo{com.example.james.card_app/com.example.james.card_app.MainMenu}: java.lang.ClassCastException: android.support.v7.widget.AppCompatImageButton cannot be cast to android.widget.Button

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

Solution icon of github
Unable to start activity ComponentInfo{org.noise_planet.noisecapture/org.noise_planet.noisecapture.CommentActivity}: java.lang.ClassCastException: android.support.v7.widget.AppCompatImageButton cannot be cast to android.widget.Button

Solution icon of stackoverflow
Unable to start activity ComponentInfo{flash4life.gespant2015.com.flashreflex20/flash4life.gespant2015.com.flashreflex20.MainActivity}: java.lang.ClassCastException: com.google.android.gms.common.SignInButton cannot be cast to android.widget.Button

Solution icon of github
Unable to start activity ComponentInfo{com.eteach.sol/com.eteach.sol.MainActivity}: java.lang.ClassCastException: android.widget.Button cannot be cast to android.widget.ImageView

Solution icon of github
Unable to start activity ComponentInfo{com.eteach.sol/com.eteach.sol.MainActivity}: java.lang.ClassCastException: android.widget.Button cannot be cast to android.widget.ImageView

Stack trace

  • java.lang.RuntimeException: 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 at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2646) 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

Samebug visitor profile picture
Unknown user
2 times, 5 months ago
Samebug visitor profile picture
Unknown user
Once, 6 months ago
16 times, 7 months ago
6 times, 10 months ago
12 times, 10 months ago
104 more bugmates