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

Stack Overflow | gunZ333 | 3 months ago
tip
Do you find the tips below useful? Click on the to mark them and say thanks to Rafael Fischer Viola and rafael . Or join the community to write better ones.
  1. 0

    Android: Error DrawerLayout cannot be cast to FrameLayout

    Stack Overflow | 3 months ago | gunZ333
    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
  2. 0
    samebug tip
    Disable Instant run in Android Studio.
    via GitHub by falecci
  3. 0
    samebug tip
    When you use findViewById inside an activity it is going to look for a View inside your main_activity.xml. If it's not there, it throws this exception, try to use the right view to call findviewById.
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    ClassCastException: android.support.v7.widget.ContentFrameLayout cannot be cast to android.support.v7.widget.ContentFrameLayout

    Stack Overflow | 5 months ago | doomtrooper
    java.lang.RuntimeException: Unable to start activity ComponentInfo{com.abc.activities/com.abc.activities.activities.SplashActivity}: java.lang.ClassCastException: android.support.v7.widget.ContentFrameLayout cannot be cast to android.support.v7.widget.ContentFrameLayout
  6. 0
    samebug tip
    This issue was solved in 2.2.6. If updating doesn't solve, try using notifyItemRangeChanged(1, mDatas.size()) instead of notifyItemRangeChanged(0, mDatas.size()).

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.ClassCastException

      android.support.v4.widget.DrawerLayout cannot be cast to android.widget.FrameLayout

      at com.jlmaychinny.app.cashbilis.Activities.BaseActivity.setContentView()
    2. com.jlmaychinny.app
      MainActivity.onCreate
      1. com.jlmaychinny.app.cashbilis.Activities.BaseActivity.setContentView(BaseActivity.java:36)
      2. com.jlmaychinny.app.cashbilis.Activities.MainActivity.onCreate(MainActivity.java:13)
      2 frames
    3. Android Platform
      ActivityThread.main
      1. android.app.Activity.performCreate(Activity.java:6092)
      2. android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1112)
      3. android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2481)
      4. android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2608)
      5. android.app.ActivityThread.access$800(ActivityThread.java:178)
      6. android.app.ActivityThread$H.handleMessage(ActivityThread.java:1470)
      7. android.os.Handler.dispatchMessage(Handler.java:111)
      8. android.os.Looper.loop(Looper.java:194)
      9. android.app.ActivityThread.main(ActivityThread.java:5637)
      9 frames
    4. Java RT
      Method.invoke
      1. java.lang.reflect.Method.invoke(Native Method)
      2. java.lang.reflect.Method.invoke(Method.java:372)
      2 frames
    5. Android
      ZygoteInit.main
      1. com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:959)
      2. com.android.internal.os.ZygoteInit.main(ZygoteInit.java:754)
      2 frames