问题
//Deilhi-XE5 Android Development
I have a strange problem when I tried to set minSdkVersion in AndroidManifest.template.xml to 14 or latest version. When it is equal "9" or "10" my app works fine. But when I set minSdkVersion manually to "14" it is running but getting crash on screen orientation change. And the most funny thing that crash appears in module IdStack (indy) (no code to that module in resize event). But problem not in Indy for sure.
Example: Open project "Forms" in Embarcadero samples (\Samples\FireMonkeyMobile\Forms). Build it and run by default settings. It is running OK. Then go to project (Forms) folder and change in AndroidManifest.template.xml param minSdkVersion = "14" (or bigger), build and run it again. When app is started try to rotate device to change screen orientation - CRASH!
Have you met this problem? Any solutions?
P.S. My device Huawei 9500 4.0.3
回答1:
Known problem. See this QC report.
No workarounds thus far, other than not setting targetSdkVersion.
回答2:
You must change
android:configChanges="orientation|keyboardHidden">
to:
android:configChanges="orientation|keyboardHidden|screenSize">
Then, you can set min, max, target as you want.
来源:https://stackoverflow.com/questions/19949190/delphi-xe5-androidmanifest-can-not-set-minsdkversion-14-or-bigger