Copy link to clipboard
Copied
Hello.
I'm using Flash Builder 4.5 to experiment with building a mobile app for my Android Nexus One. In order to keep the app in landscape mode, regardless of the orientation of the device, I've read that I need to set the following in the "AppName-app.xml" file:
<aspectRatio>landscape</aspectRatio>
<autoOrients>false</autoOrients>
And this does work fine in the debugger, however when I attempt to test it on my connected device it throws this error:
Error occurred while packaging the application:
D:\Projects\FlexMobile\AppName\bin-debug\AppName-app.xml(108): error 103: application.initialWindow.autoOrients is an unexpected element/attribute
I know that I'm able to build and test apps on my device, as I've been through the Flex Test Drive for Mobile tutorial (http://www.adobe.com/devnet/flex/testdrivemobile.html) and was able to build and run that app with no issues and this app I'm currently working on does run on the device if I do not attempt to restrict the auto orientation.
Thank you.
(Note: I'm re-posting this from the Flex SDK > Developers forum.)
Copy link to clipboard
Copied
User rblaa provided that answer in http://forums.adobe.com/thread/858772.
The <autoOrients> node (along with several others) occours twice in the generated -app.xml file. Do not un-comment the first instance, instead edit the parameters set in the second already un-commented autoOrients node.