English 中文(简体)
旋转三星电话时 App 崩溃
原标题:App crashes when rotating Samsung phone

Has anyone else expereience that the app crashes if the phone is rotated? I m running Android 4.0.3 on my Samsung Galaxy 2.

这一问题在HTC或三星操纵Android 2.3.3上并不存在。

剪贴板调试屏幕没有显示任何错误 。

我的应用程序是使用PhoneGap开发的。

当我旋转电话时的日志 :

05-25 13:38:09.155: I/GATE(20061): <GATE-M>DEV_ACTION_COMPLETED</GATE-M>
05-25 13:38:09.175: D/DroidGap(20061): Origin to allow: http://127.0.0.1*
05-25 13:38:09.175: I/CordovaLog(20061): Found log level DEBUG
05-25 13:38:09.175: I/CordovaLog(20061): Changing log level to DEBUG(3)
05-25 13:38:09.175: I/CordovaLog(20061): Found preference for classicRender
05-25 13:38:09.175: D/DroidGap(20061): DroidGap.onCreate()
05-25 13:38:09.180: D/DroidGap(20061): DroidGap.loadUrl(file:///android_asset/www/index.html)
05-25 13:38:09.180: D/DroidGap(20061): DroidGap: url=file:///android_asset/www/index.html baseUrl=file:///android_asset/www/
05-25 13:38:09.205: I/webclipboard(20061): clipservice: android.sec.clipboard.ClipboardExManager@4169fae8
05-25 13:38:09.210: D/DroidGap(20061): DroidGap.init()
05-25 13:38:09.260: D/PluginManager(20061): init()
05-25 13:38:09.280: D/WML_SISO(20061): InitPasteboardJni
05-25 13:38:09.280: D/SoftKeyboardDetect(20061): Ignore this event
05-25 13:38:09.730: W/IInputConnectionWrapper(20061): showStatusIcon on inactive InputConnection
05-25 13:38:09.790: I/GATE(20061): <GATE-M>DEV_ACTION_COMPLETED</GATE-M>
05-25 13:38:09.810: I/GATE(20061): <GATE-M>DEV_ACTION_COMPLETED</GATE-M>
问题回答

您需要添加 < code> screenSize android: configCHanges 属性, 并针对您活动的至少和机器人- 13 目标构建, 因为此值是在 API 13 级别上引入的 。

您是否试图添加 : android: configCchanges=“ 方向” in

<activity android:name=".activityName"/>




相关问题
Android - ListView fling gesture triggers context menu

I m relatively new to Android development. I m developing an app with a ListView. I ve followed the info in #1338475 and have my app recognizing the fling gesture, but after the gesture is complete, ...

AsyncTask and error handling on Android

I m converting my code from using Handler to AsyncTask. The latter is great at what it does - asynchronous updates and handling of results in the main UI thread. What s unclear to me is how to handle ...

Android intent filter for a particular file extension?

I want to be able to download a file with a particular extension from the net, and have it passed to my application to deal with it, but I haven t been able to figure out the intent filter. The ...

Android & Web: What is the equivalent style for the web?

I am quite impressed by the workflow I follow when developing Android applications: Define a layout in an xml file and then write all the code in a code-behind style. Is there an equivalent style for ...

TiledLayer equivalent in Android [duplicate]

To draw landscapes, backgrounds with patterns etc, we used TiledLayer in J2ME. Is there an android counterpart for that. Does android provide an option to set such tiled patterns in the layout XML?

Using Repo with Msysgit

When following the Android Open Source Project instructions on installing repo for use with Git, after running the repo init command, I run into this error: /c/Users/Andrew Rabon/bin/repo: line ...

Android "single top" launch mode and onNewIntent method

I read in the Android documentation that by setting my Activity s launchMode property to singleTop OR by adding the FLAG_ACTIVITY_SINGLE_TOP flag to my Intent, that calling startActivity(intent) would ...

From Web Development to Android Development

I have pretty good skills in PHP , Mysql and Javascript for a junior developer. If I wanted to try my hand as Android Development do you think I might find it tough ? Also what new languages would I ...

热门标签