ViewPager上的IllegalStateException

时间:2012-12-27 15:47:58

标签: java android android-fragments android-viewpager

我有一个使用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)

0 个答案:

没有答案