xml无法解析flash

时间:2013-05-11 21:06:46

标签: android xml air flash-cs6

我正在使用AIR for flash来创建一个Android应用程序(在原生扩展的帮助下)。当我尝试为android编译我的air应用程序时,它告诉我它无法解析我的应用程序描述文件(xml)。我无法弄清楚我的xml文件有什么问题。 Flash创建了自己的应用程序描述符文件,我添加的唯一行是本机扩展所需的3个活动行。

<?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>

1 个答案:

答案 0 :(得分:1)

您的应用描述符看起来有点乱。你应该注意在正确的地方添加所需的信息。对于android,它是CDATA标签之间<manifestAdditions>节点中的部分。这应该如下所示:

<?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>