2013-05-11 117 views
0

我正在使用AIR for flash來創建一個android應用程序(藉助本機擴展)。當我嘗試編譯我的android應用程序時,它告訴我它無法解析我的應用程序描述文件(xml)。我無法弄清楚我的xml文件有什麼問題。 Flash創建它自己的應用程序描述符文件,我添加的唯一行是本機擴展需要的3條活動行。xml無法解析flash

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

什麼版本的AIR?正如所示,這是3.2嗎? – 2013-05-11 21:35:36

+0

是的,空氣的版本是3.2 – user2367789 2013-05-11 21:37:20

回答

1

你的應用程序描述符看起來有點混亂。您應該注意在正確的位置添加所需的信息。對於android,它是<manifestAdditions>標籤之間CDATA節點中的部分。應如下所示:

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

謝謝你現在的解釋! – user2367789 2013-05-11 21:41:38