Wednesday, April 9, 2014

When the pop-bound ListView such errors, sometimes normal and sometimes there will be such a mistake


09-27 03:52:16.288: W / dalvikvm (1160): threadid = 29: thread exiting with uncaught exception (group = 0x40a13300)
09-27 03:52:16.357: E / AndroidRuntime (1160): FATAL EXCEPTION: 504146fc-6846-4a16-ba2d-75e6980bc462
09-27 03:52:16.357: E / AndroidRuntime (1160): android.view.ViewRootImpl $ CalledFromWrongThreadException: Only the original thread that created a view hierarchy can touch its views
.09-27 03:52:16.357: E / AndroidRuntime (1160): at android.view.ViewRootImpl.checkThread (ViewRootImpl.java: 4609)
09-27 03:52:16.357: E / AndroidRuntime (1160): at android.view.ViewRootImpl.focusableViewAvailable (ViewRootImpl.java: 2576)
09-27 03:52:16.357: E / AndroidRuntime (1160): at android.view.ViewGroup.focusableViewAvailable (ViewGroup.java: 604)
09-27 03:52:16.357: E / AndroidRuntime (1160): at android.view.ViewGroup.focusableViewAvailable (ViewGroup.java: 604)
09-27 03:52:16.357: E / AndroidRuntime (1160): at android.view.ViewGroup.focusableViewAvailable (ViewGroup.java: 604)
09-27 03:52:16.357: E / AndroidRuntime (1160): at android.view.ViewGroup.focusableViewAvailable (ViewGroup.java: 604)
09-27 03:52:16.357: E / AndroidRuntime (1160): at android.view.ViewGroup.focusableViewAvailable (ViewGroup.java: 604)
09-27 03:52:16.357: E / AndroidRuntime (1160): at android.view.ViewGroup.focusableViewAvailable (ViewGroup.java: 604)
09-27 03:52:16.357: E / AndroidRuntime (1160): at android.view.View.setFlags (View.java: 8290)
09-27 03:52:16.357: E / AndroidRuntime (1160): at android.view.View.setFocusableInTouchMode (View.java: 5586)
09-27 03:52:16.357: E / AndroidRuntime (1160): at android.widget.AdapterView.checkFocus (AdapterView.java: 717)
09-27 03:52:16.357: E / AndroidRuntime (1160): at android.widget.ListView.setAdapter (ListView.java: 461)
09-27 03:52:16.357: E / AndroidRuntime (1160): at org.buildingknox.com.WorkOrderList $ MyHandler.handleMessage (WorkOrderList.java: 137)
09-27 03:52:16.357: E / AndroidRuntime (1160): at android.os.Handler.dispatchMessage (Handler.java: 99)
09-27 03:52:16.357: E / AndroidRuntime (1160): at android.os.Looper.loop (Looper.java: 137)
09-27 03:52:16.357: E / AndroidRuntime (1160): at android.os.HandlerThread.run (HandlerThread.java: 60)
<-! Main posts under Banner (D4) -><-! Posts under the main text (D5) ->
Reply:
 if (b.getInt (ConfigDataFieldHelper.BundleDataFields.DATARESULTFIELD) == ConfigDataFieldHelper.BundleDataResult.DataEmpty) 
{
List > lstMapsNull = (List >) b
. Get (ConfigDataFieldHelper.BundleDataFields.DATA);
SimpleAdapter adapterNull = new SimpleAdapter (
WorkOrderList.this, lstMapsNull,
android.R.layout.simple_list_item_1,
new String []
{
"Msg"
}, New int []
{
android.R.id.text1
});
lstWorkOrder.setAdapter (adapterNull);
}

Reply:
else if (b.getInt (ConfigDataFieldHelper.BundleDataFields.DATARESULTFIELD) == ConfigDataFieldHelper.BundleDataResult.DataSuccessfully)
{
lstMaps = (List >) b
. Get (ConfigDataFieldHelper.BundleDataFields.DATA);
adapter = new SimpleAdapter (WorkOrderList.this,
lstMaps, R.layout.work_order_list_items,
new String []
{
"OrderId", "Unit", "Type", "OrderDate",
"Description"
}, New int []
{
R.id.work_order_list_item_orderid,
R.id.work_order_list_item_unit,
R.id.work_order_list_item_type,
R.id.work_order_list_item_date,
R.id.work_order_list_item_description
});
lstWorkOrder.setAdapter (adapter);

lstWorkOrder.setOnItemClickListener (lstOrderItem);
}
If the words will always be here in a red error
Reply:
See log is not in the child threads update the UI. You can use the handler to update.
Reply:
reference to the third floor tantahe reply:
see log is not in the child threads update the UI. You can use the handler to update.


So to speak, about 10 times the continuous operating time to be wrong, I do not know what went wrong!
Reply:
 09-27 06:52:46.738: E / OrderId (1545): 3 
09-27 06:52:46.738: E / Unit (1545): S1
09-27 06:52:46.738: E / Type (1545): Hardware
09-27 06:52:46.738: E / OrderDate (1545): 09/18/2012
09-27 06:52:46.738: E / Description (1545): OOOOOOOO000 test Android To Alfred


The above results are correct, but not understand why there will be the following binding errors

 
09-27 06:52:46.738: W / dalvikvm (1545): threadid = 22: thread exiting with uncaught exception (group = 0x40a13300)
09-27 06:52:46.807: E / AndroidRuntime (1545): FATAL EXCEPTION: 821d7831-2724-40b0-88b2-cb2c935cb214
09-27 06:52:46.807: E / AndroidRuntime (1545): android.view.ViewRootImpl $ CalledFromWrongThreadException: Only the original thread that created a view hierarchy can touch its views
.09-27 06:52:46.807: E / AndroidRuntime (1545): at android.view.ViewRootImpl.checkThread (ViewRootImpl.java: 4609)
09-27 06:52:46.807: E / AndroidRuntime (1545): at android.view.ViewRootImpl.focusableViewAvailable (ViewRootImpl.java: 2576)
09-27 06:52:46.807: E / AndroidRuntime (1545): at android.view.ViewGroup.focusableViewAvailable (ViewGroup.java: 604)
09-27 06:52:46.807: E / AndroidRuntime (1545): at android.view.ViewGroup.focusableViewAvailable (ViewGroup.java: 604)
09-27 06:52:46.807: E / AndroidRuntime (1545): at android.view.ViewGroup.focusableViewAvailable (ViewGroup.java: 604)
09-27 06:52:46.807: E / AndroidRuntime (1545): at android.view.ViewGroup.focusableViewAvailable (ViewGroup.java: 604)
09-27 06:52:46.807: E / AndroidRuntime (1545): at android.view.ViewGroup.focusableViewAvailable (ViewGroup.java: 604)
09-27 06:52:46.807: E / AndroidRuntime (1545): at android.view.ViewGroup.focusableViewAvailable (ViewGroup.java: 604)
09-27 06:52:46.807: E / AndroidRuntime (1545): at android.view.View.setFlags (View.java: 8290)
09-27 06:52:46.807: E / AndroidRuntime (1545): at android.view.View.setFocusableInTouchMode (View.java: 5586)
09-27 06:52:46.807: E / AndroidRuntime (1545): at android.widget.AdapterView.checkFocus (AdapterView.java: 717)
09-27 06:52:46.807: E / AndroidRuntime (1545): at android.widget.ListView.setAdapter (ListView.java: 461)
09-27 06:52:46.807: E / AndroidRuntime (1545): at org.buildingknox.com.WorkOrderList $ MyHandler.handleMessage (WorkOrderList.java: 150)
09-27 06:52:46.807: E / AndroidRuntime (1545): at android.os.Handler.dispatchMessage (Handler.java: 99)
09-27 06:52:46.807: E / AndroidRuntime (1545): at android.os.Looper.loop (Looper.java: 137)
09-27 06:52:46.807: E / AndroidRuntime (1545): at android.os.HandlerThread.run (HandlerThread.java: 60)
09-27 06:52:47.447: I / Choreographer (1545):!. Skipped 82 frames The application may be doing too much work on its main thread
09-27 06:52:47.638: D / AndroidRuntime (1545): Shutting down VM
09-27 06:52:47.638: W / dalvikvm (1545): threadid = 1: thread exiting with uncaught exception (group = 0x40a13300)
09-27 06:52:47.678: I / Process (1545): Sending signal PID:. 1545 SIG: 9

Reply:
The reply was deleted administrator at 2013-09-27 15:46:52

No comments:

Post a Comment