0

我有一个使用 viewpager 的活动。由于数据可能无法从网络获得,因此我显示了一个进度条。当我有数据时,我通过将信息注入到一个包中来重置活动,然后调用 onCreate(bundle)。这以前有效,但是在 viewpager 活动中使用该技术时,我得到了以下结果。

12-27 15:44:00.875: E/AndroidRuntime(6568): FATAL EXCEPTION: main
12-27 15:44:00.875: E/AndroidRuntime(6568): java.lang.IllegalStateException
12-27 15:44:00.875: E/AndroidRuntime(6568):     at android.support.v4.app.FragmentManagerImpl.attachActivity(FragmentManager.java:1829)
12-27 15:44:00.875: E/AndroidRuntime(6568):     at android.support.v4.app.FragmentActivity.onCreate(FragmentActivity.java:185)
12-27 15:44:00.875: E/AndroidRuntime(6568):     at com.skinanalytics.skinuploader.ui.ActivityDashboard.onCreate(ActivityDashboard.java:77)
12-27 15:44:00.875: E/AndroidRuntime(6568):     at com.skinanalytics.skinuploader.ui.ActivityDashboard$3.onSuccess(ActivityDashboard.java:203)
12-27 15:44:00.875: E/AndroidRuntime(6568):     at com.loopj.android.http.AsyncHttpResponseHandler.handleSuccessMessage(AsyncHttpResponseHandler.java:160)
12-27 15:44:00.875: E/AndroidRuntime(6568):     at com.loopj.android.http.AsyncHttpResponseHandler.handleMessage(AsyncHttpResponseHandler.java:173)
12-27 15:44:00.875: E/AndroidRuntime(6568):     at com.loopj.android.http.AsyncHttpResponseHandler$1.handleMessage(AsyncHttpResponseHandler.java:85)
12-27 15:44:00.875: E/AndroidRuntime(6568):     at android.os.Handler.dispatchMessage(Handler.java:99)
12-27 15:44:00.875: E/AndroidRuntime(6568):     at android.os.Looper.loop(Looper.java:130)
12-27 15:44:00.875: E/AndroidRuntime(6568):     at android.app.ActivityThread.main(ActivityThread.java:3687)
12-27 15:44:00.875: E/AndroidRuntime(6568):     at java.lang.reflect.Method.invokeNative(Native Method)
12-27 15:44:00.875: E/AndroidRuntime(6568):     at java.lang.reflect.Method.invoke(Method.java:507)
12-27 15:44:00.875: E/AndroidRuntime(6568):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:867)
12-27 15:44:00.875: E/AndroidRuntime(6568):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:625)
12-27 15:44:00.875: E/AndroidRuntime(6568):     at dalvik.system.NativeStart.main(Native Method)
4

0 回答 0