Adobe AIR的Andr​​oid版的Hello World [英] Adobe AIR for Android Hello World

查看:349
本文介绍了Adobe AIR的Andr​​oid版的Hello World的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在提前道歉问这样愚蠢的问题,但是: 在工作流创建AIR应用程序的移动设备,他们说

Apologies in advance for asking such stupid questions, but: In Workflow for creating AIR applications for mobile devices, they say to

  1. 创建AIR应用程序描述符文件(使用2.5或更高版本的命名空间)。
  2. 编译应用程序。
  3. 将应用程序打包成Android包(.apk文件)。

他们是怎么通过AIR应用程序描述符文件是什么意思?难道他们的意思是application.xml中?

What do they mean by an AIR application descriptor file? Do they mean application.xml?

什么是他们的2.5命名空间是什么意思? 我看到应用程序的xmlns =htt​​p://ns.adobe.com/air/application/2.0application.xml中。 如何获取最新的命名空间?

What do they mean by the 2.5 namespace? I see application xmlns="http://ns.adobe.com/air/application/2.0" in application.xml. How do I get the latest namespace?

他们是怎么通过编译指的是应用程序?我使用的Aptana,有没有编译菜单选项,所以做他们的意思是使用导出Adobe AIR包按钮。

What do they mean by Compile the application? I'm using Aptana and there's no compile menu option, so do they mean to use the Export Adobe AIR package button.

这是什么意思将应用程序打包成Android包?的是,同样导出Adobe AIR包按钮?我没有看到的apk任何地方集锦提到的。

What do they mean to Package the application as an Android package? Is that the same Export Adobe AIR package button? I don't see .apk mentioned anywhere in Aptana.

推荐答案

假设你有一个AIR应用程序:的HelloWorld

Say you have an air app: HelloWorld.

通过应用程序描述符文件,他们的意思是的HelloWorld-app.xml的文件,在其中配置您的应用程序的行为和基本陈列(大小,图标等。)

By application descriptor file they mean the HelloWorld-app.xml file, where you configure the behavior and basic display of your application (size, icons, etc.)

2.5的命名空间,他们的意思是,你必须有目前的空气(2.5或更高版本)运行时 。目前的SDK版本是2.6,从这里下载。
我建议你​​使用(目前最新的)的Flex SDK英雄不过,这已经是必然的air2.5运行,这样你就不需要手动合并Flex和AIR的SDK。
然后设置您的环境中使用这种新AIR SDK,并且从这一点上,在你的应用程序描述XML的新版本将生成。

By 2.5 namespace they mean, that you must have the current air (2.5 or higher) runtime. The current sdk release is the 2.6, downloadable from here.
I'd suggest you to use the (currently latest) Flex Hero SDK though, which is already bound with the air2.5 runtime, this way you don't need to merge the flex and air SDKs manually.
Then you set up your environment to use this new air sdk, and from that point on, in your application descriptor xml the new version will be generated.

通过编译,他们的意思是......好:编译。让您的code理解的机器。在这一点上的mxmlc应当使用(未compc命令)。 更多关于它这里。一个IDE通常不会这样的背景,例如。每次保存操作,或运行前右,所以也许你不应该打扰。
编译code后,你就会有正确的SWF在你的仓或滨释放或斌-debug文件夹(或者调试启用与否)。

By compiling they mean ... well: compiling. making your code understandable by your machine. At this point mxmlc should be used (not compc). More about it here. An IDE usually does this in the background eg. on every save action, or right before running, so probably you shouldn't bother.
After compiling your code, you'll have the proper swf (either debug-enabled or not) inside your bin or bin-release or bin-debug folder.

通过将应用程序打包成一个Android包,他们的意思是,你必须创建一个 .apk文件文件(这是和应用程序包使用的机器人)。您可以使用ADT命令创建APK文件:

By packaging the application into an Android package, they mean that you have to create an .apk file (that's and application package used by android). You can create an apk file using the adt command:

adt -package 
    -target apk 
    -storetype [yourstoretyp] 
    -keystore [yourkeystore] HelloWorld.apk HelloWorld-app.xml HelloWorld.swf 

注意

在应用程序描述符的可见标志应设置为true:

In your application descriptor the visible flag should be set to true:

<visible>true</visible>

您AndroidManifest.xml文件必须嵌入到你的AIR应用程序描述XML。嵌入式Android清单样本是:

Your androidManifest.xml file must be embedded into your air application descriptor xml. A sample embedded android manifest is:

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

这篇关于Adobe AIR的Andr​​oid版的Hello World的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆