Android error: The content of the adapter has changed... and Channel is unrecoverably broken and will be disposed analysis and solution, hostchanneladapter
Adapter error in Android:
The content of the adapter has changed but ListView did not receive a notification. Make sure the content of your adapter is not modified from a background thread, but only from the UI thread.
Analysis:
This error is usually caused by a static list that may be passed in by listview and other controls when adapter is used to adapt to data. In the adapter, The = number is directly used to assign values, when the external list is changed (for example, the list is operated by multiple threads), The notifyDataSetChanged API of the adapter is not called in time, causing an error in the next update.
Solution:
In the adapter, do not assign values with the = value directly. Use the following two methods to re-allocate the memory:
1: list. clear, list. addall.
2: arraylist. clone.
------------------------------------------------------------------------
Android error: Channel is unrecoverably broken and will be disposed!
Analysis:
When using some methods, the input parameters are incorrect or the format is incorrect. Example: Integer. parseInt ("")
Solution:
Locate the cause of the problem, make a judgment first, and then pass the value.