java.lang.ClassCastException: org.nativescript.widgets.CommonLayoutParams cannot be cast to android.support.v7.widget.Toolbar$LayoutParams

GitHub | hamorphis | 9 months ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    GitHub comment 2184#229288004

    GitHub | 9 months ago | hamorphis
    java.lang.ClassCastException: org.nativescript.widgets.CommonLayoutParams cannot be cast to android.support.v7.widget.Toolbar$LayoutParams

    Root Cause Analysis

    1. java.lang.ClassCastException

      org.nativescript.widgets.CommonLayoutParams cannot be cast to android.support.v7.widget.Toolbar$LayoutParams

      at android.support.v7.widget.Toolbar.onMeasure()
    2. Android v7
      Toolbar.onMeasure
      1. android.support.v7.widget.Toolbar.onMeasure(Toolbar.java:1320)
      1 frame
    3. Android Platform
      View.measure
      1. android.view.View.measure(View.java:18788)
      1 frame
    4. org.nativescript.widgets
      GridLayout.onMeasure
      1. org.nativescript.widgets.CommonLayoutParams.measureChild(CommonLayoutParams.java:231)
      2. org.nativescript.widgets.MeasureHelper.measureChildFixedColumns(GridLayout.java:959)
      3. org.nativescript.widgets.MeasureHelper.measureFixedColumnsNoStarRows(GridLayout.java:757)
      4. org.nativescript.widgets.MeasureHelper.measure(GridLayout.java:850)
      5. org.nativescript.widgets.GridLayout.onMeasure(GridLayout.java:279)
      5 frames
    5. Android Platform
      View.measure
      1. android.view.View.measure(View.java:18788)
      1 frame
    6. org.nativescript.widgets
      ContentLayout.onMeasure
      1. org.nativescript.widgets.CommonLayoutParams.measureChild(CommonLayoutParams.java:231)
      2. org.nativescript.widgets.ContentLayout.onMeasure(ContentLayout.java:32)
      2 frames
    7. Android Platform
      FrameLayout.onMeasure
      1. android.view.View.measure(View.java:18788)
      2. android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5951)
      3. android.widget.FrameLayout.onMeasure(FrameLayout.java:194)
      4. android.view.View.measure(View.java:18788)
      5. android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5951)
      6. android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1465)
      7. android.widget.LinearLayout.measureVertical(LinearLayout.java:748)
      8. android.widget.LinearLayout.onMeasure(LinearLayout.java:630)
      9. android.view.View.measure(View.java:18788)
      10. android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5951)
      11. android.widget.FrameLayout.onMeasure(FrameLayout.java:194)
      11 frames
    8. Android
      PhoneWindow$DecorView.onMeasure
      1. com.android.internal.policy.PhoneWindow$DecorView.onMeasure(PhoneWindow.java:2643)
      1 frame
    9. Android Platform
      ActivityThread.main
      1. android.view.View.measure(View.java:18788)
      2. android.view.ViewRootImpl.performMeasure(ViewRootImpl.java:2100)
      3. android.view.ViewRootImpl.measureHierarchy(ViewRootImpl.java:1216)
      4. android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1452)
      5. android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1107)
      6. android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6013)
      7. android.view.Choreographer$CallbackRecord.run(Choreographer.java:858)
      8. android.view.Choreographer.doCallbacks(Choreographer.java:670)
      9. android.view.Choreographer.doFrame(Choreographer.java:606)
      10. android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:844)
      11. android.os.Handler.handleCallback(Handler.java:739)
      12. android.os.Handler.dispatchMessage(Handler.java:95)
      13. android.os.Looper.loop(Looper.java:148)
      14. android.app.ActivityThread.main(ActivityThread.java:5417)
      14 frames
    10. Java RT
      Method.invoke
      1. java.lang.reflect.Method.invoke(Native Method)
      1 frame
    11. Android
      ZygoteInit.main
      1. com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
      2. com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
      2 frames