java.lang.RuntimeException: Unable to start activity ComponentInfo{com.jlmaychinny.app.cashbilis/com.jlmaychinny.app.cashbilis.Activities.MainActivity}: java.lang.ClassCastException: android.support.v4.widget.DrawerLayout cannot be cast to android.widget.FrameLayout


Solutions on the web17670

Solution icon of stackoverflow
Unable to start activity ComponentInfo{com.jlmaychinny.app.cashbilis/com.jlmaychinny.app.cashbilis.Activities.MainActivity}: java.lang.ClassCastException: android.support.v4.widget.DrawerLayout cannot be cast to android.widget.FrameLayout

Solution icon of stackoverflow
Unable to start activity ComponentInfo{com.support.android.designlibdemo/com.support.android.designlibdemo.MainActivity}: java.lang.ClassCastException: android.support.v4.widget.DrawerLayout$LayoutParams cannot be cast to android.support.design.widget.CoordinatorLayout$LayoutParams

Solution icon of web
Unable to start activity ComponentInfo{com.example.dexter.contentpro/com.example.dexter.contentpro.MainActivity}: java.lang.ClassCastException: android.widget.FrameLayout$LayoutParams cannot be cast to android.widget.RelativeLayout$LayoutParams

Solution icon of web
Unable to start activity ComponentInfo{com.example.dexter.contentpro/com.example.dexter.contentpro.MainActivity}: java.lang.ClassCastException: android.widget.FrameLayout$LayoutParams cannot be cast to android.widget.RelativeLayout$LayoutParams

Solution icon of github
Unable to start activity ComponentInfo{com.mobicomkit.sample/com.applozic.mobicomkit.uiwidgets.people.activity.MobiComKitPeopleActivity}: java.lang.ClassCastException: com.applozic.mobicomkit.uiwidgets.contacts.fragment.AppContactFragment cannot be cast to com.applozic.mobicomkit.uiwidgets.people.fragment.ContactsListFragment

Solution icon of github
via GitHub by thehijjt
, 1 year ago
Unable to start activity ComponentInfo{org.kegbot.app/org.kegbot.app.SettingsActivity}: java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Boolean

Solution icon of appcelerator
via Appcelerator JIRA by Fokke Zandbergen, 1 year ago
Unable to start activity ComponentInfo{test.android/org.appcelerator.titanium.TiActivity}: java.lang.ClassCastException: android.graphics.drawable.ColorDrawable cannot be cast to android.support.v7.widget.RoundRectDrawable

Solution icon of stackoverflow
via Stack Overflow by userxx
, 1 year ago
Unable to start activity ComponentInfo{com.example.studygroup/com.example.studygroup.MainActivity}: java.lang.ClassCastException: android.app.Application cannot be cast to com.example.studygroup.MainActivity

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.texttospeechapp/com.example.texttospeechapp.MainActivity}: java.lang.ClassCastException: com.example.texttospeechapp.MainActivity cannot be cast to android.speech.tts.TextToSpeech$OnInitListener

Stack trace

java.lang.RuntimeException: Unable to start activity ComponentInfo{com.jlmaychinny.app.cashbilis/com.jlmaychinny.app.cashbilis.Activities.MainActivity}: java.lang.ClassCastException: android.support.v4.widget.DrawerLayout cannot be cast to android.widget.FrameLayout
	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2534)
	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2608)
	at android.app.ActivityThread.access$800(ActivityThread.java:178)
	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1470)
	at android.os.Handler.dispatchMessage(Handler.java:111)
	at android.os.Looper.loop(Looper.java:194)
	at android.app.ActivityThread.main(ActivityThread.java:5637)
	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:959)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:754)
Caused by: java.lang.ClassCastException: android.support.v4.widget.DrawerLayout cannot be cast to android.widget.FrameLayout
	at com.jlmaychinny.app.cashbilis.Activities.BaseActivity.setContentView(BaseActivity.java:36)
	at com.jlmaychinny.app.cashbilis.Activities.MainActivity.onCreate(MainActivity.java:13)
	at android.app.Activity.performCreate(Activity.java:6092)
	at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1112)
	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2481)
	... 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

You are the first who have seen this exception. Write a tip to help other users and build your expert profile.