Phonegap app crashes when switched orientation even with AndroidManifest changes

前端 未结 2 865
逝去的感伤
逝去的感伤 2020-12-25 13:46

Here\'s my Manifest:




        
相关标签:
2条回答
  • 2020-12-25 14:03

    Here's my solution Add "screenSize" to the android:configChanges in each Activity tag (within the AnroidManifest.xml).

    Like this:

    android:configChanges="orientation|screenSize|keyboardHidden"
    

    It solved my problem.

    0 讨论(0)
  • 2020-12-25 14:17

    In your case the attribute android:configChanges="orientation|screenSize|keyboardHidden" should go to the first <activity> tag and not the <application> tag.

    For the other people having similar issues simply add screenSize to android:configChanges="orientation|keyboardHidden" or change the android:minSdkVersion attribute to 12 or lower.

    A more detailed explanation of this behavior can be found here: http://groups.google.com/group/phonegap/msg/c771fffc4dd9daaf

    0 讨论(0)
提交回复
热议问题