Android onNewIntent报错java.lang.IllegalStateException
来源:互联网 发布:linux怎么加入环境变量 编辑:程序博客网 时间:2024/05/17 20:27
app中HomeActivity是主界面,其是按照FragmentTabHost布局,是singletop模式;在从其他Activity跳转HomeActivity的时候,有时会报如下错误:
java.lang.IllegalStateException: Can not perform this action after onSaveInstanceState\n\tat android.support.v4.app.FragmentManagerImpl.checkStateLoss(FragmentManager.java:1365)\n\tat android.support.v4.app.FragmentManagerImpl.enqueueAction(FragmentManager.java:1383)\n\tat android.support.v4.app.BackStackRecord.commitInternal(BackStackRecord.java:636)\n\tat android.support.v4.app.BackStackRecord.commit(BackStackRecord.java:615)\n\tat android.support.v4.app.FragmentTabHost.onTabChanged(FragmentTabHost.java:313)\n\tat android.widget.TabHost.invokeOnTabChangeListener(TabHost.java:401)\n\tat android.widget.TabHost.setCurrentTab(TabHost.java:386)\n\tat com.snda.gfriend.business.HomeActivity.onNewIntent(HomeActivity.java:170)\n\tat android.app.Instrumentation.callActivityOnNewIntent(Instrumentation.java:1168)\n\tat android.app.ActivityThread.deliverNewIntents(ActivityThread.java:2207)\n\tat android.app.ActivityThread.performNewIntents(ActivityThread.java:2220)\n\tat android.app.ActivityThread.handleNewIntent(ActivityThread.java:2229)\n\tat android.app.ActivityThread.access$1500(ActivityThread.java:143)\n\tat android.app.ActivityThread$H.handleMessage(ActivityThread.java:1312)\n\tat android.os.Handler.dispatchMessage(Handler.java:99)\n\tat android.os.Looper.loop(Looper.java:137)\n\tat android.app.ActivityThread.main(ActivityThread.java:4960)\n\tat java.lang.reflect.Method.invokeNative(Native Method)\n\tat java.lang.reflect.Method.invoke(Method.java:511)\n\tat com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1038)\n\tat com.android.internal.os.ZygoteInit.main(ZygoteInit.java:805)\n\tat dalvik.system.NativeStart.main(Native Method)\n
最后仔细看了API发现是onNewIntent中少调用了super.onNewIntent(intent);
加上后问题解决;
ps:好记星不如烂笔头;
0 0
- Android onNewIntent报错java.lang.IllegalStateException
- Android 点击变色,报错 java.lang.IllegalStateException
- android studio 报 java.lang.IllegalStateException 异常
- 报java.lang.IllegalStateException
- 错误:Junit报错java.lang.IllegalStateException
- okhttp报错:java.lang.IllegalStateException: closed
- android 报错 java.lang.IllegalStateException: Could not find a method next(View)
- android 用Canvas 编辑图片报java.lang.IllegalStateException错的解决办法
- android json解析java.lang.IllegalStateException: Expected BEGIN_ARRAY but was BEGIN_OBJECT at line 1报错
- Android RecyclerView 报错:java.lang.IllegalStateException: The specified child already has a...
- Java.eclipse启动报错java.lang.IllegalStateException: LifecycleProcessor
- 关于jsp验证报错 java.lang.IllegalStateException: getOutputStream
- 报错java.lang.IllegalstateException 解决的的思路
- xfire报错java.lang.IllegalStateException: Could not initialize Service.
- eclipse启动报错java.lang.IllegalStateException: LifecycleProcessor not initialized
- [AS尝龟]Recyclerview的OnCreatViewHolder报错:java.lang.IllegalStateException
- 报错: java.lang.IllegalStateException: Failed to load ApplicationContext
- Android的java.lang.IllegalStateException
- hashCode和equals重写
- Python核心编程 示例错误
- Java build模式
- MongoDB入门学习笔记之mongo shell和java客户端
- c++ stl 之vector浅析
- Android onNewIntent报错java.lang.IllegalStateException
- LitePal + Gson + Volley的ORM框架尝试
- const
- Linux环境下一种比较有用的多线程程序调试技巧
- 辛星解读一次在mysql中获取排名的实例
- 文档管理
- vb.net Excel文件转二进制文件,及反转
- package manager service是怎样选择armeabi/armeabi-v7a中的库文件的?
- Android 调试助手ATools [WIFI BT NFC GPS USB BLE 蓝牙串口 iBeacon ......]