• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

error 103: application.initialWindow.autoOrients is an unexpected element/attribute

Explorer ,
May 31, 2011 May 31, 2011

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.

TOPICS
Developers

Views

2.1K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Beginner , Jun 03, 2011 Jun 03, 2011

I have the same problem with FB 4.5. App builds and runs fine, but if I have the <autoOrients> tag it does not build.

Something is broken, or else the tag got migrated in AIR 2.6?

Is there a way to set this at runtime instead?

edit: yes there is: Stage.autoOrients and Stage.deviceOrientation

edit 2: which did not work for me (yet) with Flex 4.

final update: <autoOrients>false</autoOrients> works just fine! The problem was that I had it twice in my -app.xml file.

Votes

Translate

Translate
Community Beginner ,
Jun 03, 2011 Jun 03, 2011

Copy link to clipboard

Copied

I have the same problem with FB 4.5. App builds and runs fine, but if I have the <autoOrients> tag it does not build.

Something is broken, or else the tag got migrated in AIR 2.6?

Is there a way to set this at runtime instead?

edit: yes there is: Stage.autoOrients and Stage.deviceOrientation

edit 2: which did not work for me (yet) with Flex 4.

final update: <autoOrients>false</autoOrients> works just fine! The problem was that I had it twice in my -app.xml file.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jun 07, 2011 Jun 07, 2011

Copy link to clipboard

Copied

LATEST

Ah, I see!

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.

This fixed the error in my application as well.

Thank you rblaa.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines