`

Android4.0 bug Can not perform this action after onSaveInstanceState - How to prevent?

 
阅读更多

Please check my answerhere. Basically I just had to :

@Override
protected void onSaveInstanceState(Bundle outState) {
  //No call for super(). Bug on API Level > 11.
}

don't make the call tosuper()on thesaveInstanceStatemethod. This was messing things up...

EDIT:after some more research, this is a knowbugin the support package.

If you nead to save the instance, and add something to youroutStateBundleyou can use the following :

@Override
protected void onSaveInstanceState(Bundle outState) {
  outState.putString("WORKAROUND_FOR_BUG_19917_KEY", "WORKAROUND_FOR_BUG_19917_VALUE");
  super.onSaveInstanceState(outState);
}
分享到:
评论

相关推荐

    action-buffer:提供了在处理后台任务时避免片段过渡期间出现 IllegalStateException 的示例

    这个存储库提供了一种在处理片段传输和后台任务时避免“java.lang.IllegalStateException:Can not perform this action after onSaveInstanceState”的方法。 您可以在的非常权威的阅读有关该问题和可能的解决方案...

    j-link v9 修复

    **J-Link V9 固件修复指南** J-Link 是 SEGGER 公司推出的一款广受欢迎的仿真器和编程器,它支持多种微控制器和嵌入式系统,为开发者提供方便的调试环境。J-Link V9 是该系列的一个版本,可能会遇到需要修复固件的...

    Senfore_DragDrop_v4.1

    This is believed to be a bug in the Windows clipboard and a work around hasn't been found yet. * Asynchronous targets appears to be broken in the current release. * When TDropFileTarget....

    Could not perform operation -- unexpected exception. Unexpected failure (8000ff

    在尝试使用INTouch 2014 R2 SP1版本软件在Windows 10操作系统上创建新型应用程序时,用户遇到了“Could not perform operation -- unexpected exception. Unexpected failure (8000ffff)”这一错误提示。该问题出现...

    The Executive’s How-To Guide to Automation

    This book will arm business people with the tools needed to automate companies, making them perform better, move faster, operate cheaper, and provide great lasting value to investors. Part l. Our ...

    Android代码-Library

    For more information on how to do this please refere to http://developer.android.com/training/index.html Then go the base directory of your local working copy and run: $ android update project --...

    SharePoint 2010 How-To

    SharePoint® 2010 How-To Ishai Sagi Real Solutions for SharePoint 2010 Users Need fast, reliable, easy-to-implement solutions for SharePoint 2010? This book delivers exactly what you’re looking ...

    JavaScript Security(PACKT,2014)

    This book starts off with an introduction to JavaScript security and gives you an overview of the basic functions JavaScript can perform on the Web, both on the client side and the server side....

    Multicast in Third-Generation Mobile Networks: Services, Mechanisms and Performance

    In this book, the authors describe how to perform multicast, the one-to-many delivery of data to a group of destinations, in third-generation mobile networks. The authors provide an overview of the ...

    jlink 固件烧录指南

    ### J-LINK V8固件烧录指南 #### 一、引言 J-LINK是一款广泛应用于嵌入式系统开发的编程器与调试器,它能够帮助开发者完成代码的调试和固件的烧录工作。然而,在长时间使用过程中,由于各种原因可能会导致J-LINK...

    AndBug-A Scriptable Android Debugger

    It uses the same interfaces as Android's Eclipse debugging plugin, the Java Debug Wire Protocol (JDWP) and Dalvik Debug Monitor (DDM) to permit users to hook Dalvik methods, examine process state, and...

    Android 6 Programming: Android Studio Development Guide

    This is a guide to Android application developers on how to use Android Studio 6 to develop their apps. The first part is a guide on how to use the Code Editor in Android 6. The Code Editor provides ...

    Bochs - The cross platform IA-32 (x86) emulator

    - Added Bochs compilation timestamp after Bochs version string. - GUI and display libraries (Volker) - Added new .bochsrc option to select mouse capture toggle method. In addition to the default ...

    jwts-not-safe-e-book.pdf

    - **Authorization:** Once the user is authenticated, the server checks the user's permissions and roles to determine what actions they can perform within the application. 5. **When Will the Session ...

    How to Perform System Replication for SAP HANA 2.0

    How to Perform System Replication for SAP HANA 2.0 How to Perform System Replication for SAP HANA 2.0

Global site tag (gtag.js) - Google Analytics