假設您有空氣應用程序:HelloWorld
。
由應用程序描述符文件,他們的意思是HelloWorld-app.xml
文件,在其中配置您的應用程序(大小,圖標等)
的行爲和基本陳列到2.5命名空間,他們的意思是,你必須有current air (2.5 or higher) runtime。目前的sdk版本是2.6,0.
我建議你使用(當前最新的)Flex Hero SDK雖然它已經綁定到air2.5運行時,這樣你就不需要合併flex和air SDKs手動。
然後,您將您的環境設置爲使用這個新的空氣sdk,並從這一點開始,在您的應用程序描述符xml中生成新版本。
編譯它們意味着......編譯。使您的代碼可以通過您的機器理解。此時應使用mxmlc(而不是compc)。 More about it here。 IDE通常在後臺執行此操作,例如。在每一次保存行動中,或在跑步之前,所以可能你不應該打擾。
編譯完代碼後,您將在bin或bin-release或bin-debug文件夾中擁有正確的swf(啓用或不啓用調試)。
通過將應用程序打包成Android包,他們的意思是,你必須創建一個.apk
文件(這是和應用程序包由Android使用)。您可以使用ADT命令創建APK文件:
adt -package
-target apk
-storetype [yourstoretyp]
-keystore [yourkeystore] HelloWorld.apk HelloWorld-app.xml HelloWorld.swf
注意
在您的應用程序描述visible
標誌應當設置爲true:
<visible>true</visible>
AndroidManifest.xml檔案必須嵌入到您的空氣應用程序描述符xml中。一個嵌入式Android清單示例如下:
<application>
[...]
<android>
<manifestAdditions>
<![CDATA[
<manifest android:installLocation='auto'>
<uses-permission android:name="android.permission.INTERNET" />
<supports-screens android:normalScreens="true"/>
<uses-feature android:required="true" android:name="android.hardware.touchscreen.multitouch"/>
<application android:enabled="true">
<activity android:excludeFromRecents="false">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
]]>
</manifestAdditions>
</android>
[...]
</application>
Rekaszeru,非常感謝你這麼長時間的迴應! – 2011-04-22 17:14:23
沒問題,我希望你能快速工作!如果有任何疑問,請不要猶豫,問一個新問題。 – rekaszeru 2011-04-22 17:32:33