In recent work there is a need to modify the android:screenorientation= "user" in the APK generated by air for Android to android:screenorientation= "Landscape". The reason is that some Platform SDK access air for Android will appear when the home key returns the interface disappears, Starling loses focus bug. If changed to android:screenorientation= "Landscape", android:launchmode= "standard" can solve this problem.
This is what is generated by default:
Need to be modified to:
Android:launchmode= "Standard" is easy to modify, go directly to the default generated project under Modify Main-app.xml (This is my project, your project name may not be the case). Add one line: android:launchmode= "Standard"
But android:screenorientation= "Landscape" This change is more troublesome, if directly like the above will be in the packaging when the error. What do we do?
I refer to other people's methods, directly modify the Adt.jar under the Air SDK. Because air must have a default configuration, the default configuration is to configure Android:screenorientation as "user". All we need to do is modify it.
The method of modification is very simple, directly with the command line: (Run the need to configure the Java environment)
?
| 1 2 3 4 |
@echo off jar tf adt.jar //列出adt.jar文件目录 jar xf adt.jar com/adobe/air/apk/AndroidManifest_template.xml //解压出要修改的文件pause //暂停的过程中修改AndroidManifest_template.xml |
?
| 1 |
jar uf adt.jar com/adobe/air/apk/AndroidManifest_template.xml //更新adt.jar下的文件<br>echo =========== over ============== <br>echo 再点一下就结束了 pause |
This creates a new Adt.jar. into the SDK directory. RePack. Has it been modified?