Search code examples
androidxmlairflash-cs6

xml can't be parsed flash


I am using AIR for flash to create an android app (with the help of a native extension). When I try to compile my air application for android it tells me it can't parse my application description file (xml). I can't figure out what is wrong with my xml file. Flash creates it's own application descriptor file, the only lines I added were the 3 activity lines which the native extension requires.

<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<application xmlns="http://ns.adobe.com/air/application/3.2">
  <id>test</id>
  <versionNumber>1.0.0</versionNumber>
  <versionLabel/>
  <filename>test</filename>
  <description/>
<!-- To localize the description, use the following format for the description element.<description><text xml:lang="en">English App description goes here</text><text xml:lang="fr">French App description goes here</text><text xml:lang="ja">Japanese App description goes here</text></description>-->
  <name>test</name>
<!-- To localize the name, use the following format for the name element.<name><text xml:lang="en">English App name goes here</text><text xml:lang="fr">French App name goes here</text><text xml:lang="ja">Japanese App name goes here</text></name>-->
  <copyright/>
  <initialWindow>
    <content>test.swf</content>
    <systemChrome>standard</systemChrome>
    <transparent>false</transparent>
    <visible>true</visible>
    <fullScreen>false</fullScreen>
    <aspectRatio>portrait</aspectRatio>
    <renderMode>cpu</renderMode>
    <autoOrients>false</autoOrients></initialWindow>
  <icon/>
  <customUpdateUI>false</customUpdateUI>
  <allowBrowserInvocation>false</allowBrowserInvocation>
  <android>
    <manifestAdditions>
      <![CDATA[<manifest>
<uses-permission android:name="android.permission.INTERNET"/>

</manifest>]]>
    </manifestAdditions>
  </android>
    <activity android:name="com.freshplanet.ane.AirFacebook.LoginActivity" android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen"/>
    <activity android:name="com.freshplanet.ane.AirFacebook.DialogActivity" android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen"/>
    <activity android:name="com.freshplanet.ane.AirFacebook.ExtendAccessTokenActivity"/>
  <extensions>
    <extensionID>com.freshplanet.AirFacebook</extensionID>
  </extensions>
</application>

Solution

  • Your app descriptor looks a bit messy. You should pay attention adding needed informations in the right place. For android it's the section in the CDATA node between the <manifestAdditions> tags. That should look like below:

    <?xml version="1.0" encoding="UTF-8" standalone="no" ?>
    <application xmlns="http://ns.adobe.com/air/application/3.2">
      <id>test</id>
      <versionNumber>1.0.0</versionNumber>
      <versionLabel/>
      <filename>test</filename>
      <description/>
    <!-- To localize the description, use the following format for the description element.<description><text xml:lang="en">English App description goes here</text><text xml:lang="fr">French App description goes here</text><text xml:lang="ja">Japanese App description goes here</text></description>-->
      <name>test</name>
    <!-- To localize the name, use the following format for the name element.<name><text xml:lang="en">English App name goes here</text><text xml:lang="fr">French App name goes here</text><text xml:lang="ja">Japanese App name goes here</text></name>-->
      <copyright/>
      <initialWindow>
        <content>test.swf</content>
        <systemChrome>standard</systemChrome>
        <transparent>false</transparent>
        <visible>true</visible>
        <fullScreen>false</fullScreen>
        <aspectRatio>portrait</aspectRatio>
        <renderMode>cpu</renderMode>
        <autoOrients>false</autoOrients></initialWindow>
      <icon/>
      <customUpdateUI>false</customUpdateUI>
      <allowBrowserInvocation>false</allowBrowserInvocation>
      <android>
        <manifestAdditions>
          <![CDATA[
            <manifest>
             <uses-permission android:name="android.permission.INTERNET"/>
    
             <application android:enabled="true">
               <activity android:name="com.freshplanet.ane.AirFacebook.LoginActivity" android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen"/>
               <activity android:name="com.freshplanet.ane.AirFacebook.DialogActivity" android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen"/>
               <activity android:name="com.freshplanet.ane.AirFacebook.ExtendAccessTokenActivity"/>
             </application>
    
            </manifest>
          ]]>
        </manifestAdditions>
      </android>
    
      <extensions>
        <extensionID>com.freshplanet.AirFacebook</extensionID>
      </extensions>
    
    </application>