java.lang.ClassCastException: java.lang.String cannot be cast to android.view.View$OnLayoutChangeListener

mozilla.com | 4 months ago
tip
Do you find the tips below useful? Click on the to mark them and say thanks to rafael . Or join the community to write better ones.
  1. 0

    2015-07-28 FennecAndroid Release 39 Startup Crash Report

    mozilla.com | 4 months ago
    java.lang.ClassCastException: java.lang.String cannot be cast to android.view.View$OnLayoutChangeListener
  2. 0
    samebug tip
    This happens when you have android:animateLayoutChanges set to true in your XML file and you call notifyDataSetChanged(). To fix it, you have to set android:animateLayoutChanges to false.
  3. 0
    samebug tip
    This happens as well when you recycle a EditText when it has focus. Try setting android:focusableInTouchMode="true" on your RecycleView.
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 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()).
  6. 0
    samebug tip
    Also, you should dispatch events as soon as they happen, ReciclerView already bundles all updates.

    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

      java.lang.String cannot be cast to android.view.View$OnLayoutChangeListener

      at android.view.View.layout()
    2. Android Platform
      View.layout
      1. android.view.View.layout(View.java)
      1 frame