---
title: "Phonegap app crashes when switched orientation even with AndroidManifest changes"
author: "squall140"
date: "2013-08-12T15:35:13Z"
tags: []
categories: ["移动开发"]
slug: "phonegap-app-crashes-when-switched-orientation-even-with-androidmanifest-changes"
draft: false
lastmod: "2013-08-12T15:35:13Z"
id: 1923495
url: "https://squall140.iteye.com/blog/1923495"
---

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](http://groups.google.com/group/phonegap/msg/c771fffc4dd9daaf)