0

私のコードの問題は何ですか?

STACK_TRACE=java.lang.IllegalStateException: 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. [in ListView(2131296324, class android.widget.ListView) with Adapter(class com.platinumapps.platinumtasks.ActionsAdapter)]
at android.widget.ListView.layoutChildren(ListView.java:1556)
at android.widget.AbsListView$CheckForTap.run(AbsListView.java:2868)
at android.os.Handler.handleCallback(Handler.java:587)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:132)
at android.app.ActivityThread.main(ActivityThread.java:4126)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:491)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:844)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:602)
at dalvik.system.NativeStart.main(Native Method)
4

2 に答える 2

0

これを以下の中で呼び出し、これをスレッドの中に入れます

             runOnUiThread(new Runnable(){
                 @Override
                 public void run() {
                    // call it here
                 }  
             }
于 2012-05-24T05:49:32.233 に答える
0

HandlersUI-threadsまたは(実行後) を使用AsyncTaskして を呼び出しますnotifydatasetchanged();。あなたはバックグラウンドスレッドでそれをやっています...

于 2012-05-24T06:00:29.177 に答える