我正在尝试更改OnLoadFinished()
方法中的片段,CursorLoader
但出现以下异常:
0-15 13:16:35.565 265-293/system_process E/Lights﹕ write_int failed to open sys/class/leds/rk29_key_led/brightness
10-15 13:19:12.265 4998-4998/com.mobiotics.tvb_stb E/Trace﹕ error opening trace file: No such file or directory (2)
10-15 13:19:12.845 4998-4998/com.mobiotics.tvb_stb E/AndroidRuntime﹕ FATAL EXCEPTION: main
java.lang.IllegalStateException: Can not perform this action inside of onLoadFinished
at android.app.FragmentManagerImpl.checkStateLoss(FragmentManager.java:1284)
at android.app.FragmentManagerImpl.enqueueAction(FragmentManager.java:1291)
at android.app.BackStackRecord.commitInternal(BackStackRecord.java:548)
at android.app.BackStackRecord.commit(BackStackRecord.java:532)
at com.mobiotics.tvb_stb.activity.HomeScreenActivity.OnChannelCountChanged(HomeScreenActivity.java:308)
at com.mobiotics.tvb_stb.fragments.ChannelDBThumbFragment.onLoadFinished(ChannelDBThumbFragment.java:234)
at com.mobiotics.tvb_stb.fragments.ChannelDBThumbFragment.onLoadFinished(ChannelDBThumbFragment.java:44)
at android.app.LoaderManagerImpl$LoaderInfo.callOnLoadFinished(LoaderManager.java:482)
at android.app.LoaderManagerImpl$LoaderInfo.onLoadComplete(LoaderManager.java:450)
at android.content.Loader.deliverResult(Loader.java:143)
at android.content.CursorLoader.deliverResult(CursorLoader.java:113)
at android.content.CursorLoader.deliverResult(CursorLoader.java:43)
at android.content.AsyncTaskLoader.dispatchOnLoadComplete(AsyncTaskLoader.java:254)
at android.content.AsyncTaskLoader$LoadTask.onPostExecute(AsyncTaskLoader.java:91)
at android.os.AsyncTask.finish(AsyncTask.java:631)
at android.os.AsyncTask.access$600(AsyncTask.java:177)
at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:644)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4745)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
at dalvik.system.NativeStart.main(Native Method)
帮助我弄清楚我在这里做错了什么!