【问题标题】:Reference Error when deploying AIR application to android device将 AIR 应用程序部署到 android 设备时出现参考错误
【发布时间】:2011-02-24 23:07:02
【问题描述】:

我的适用于 Android 设备的 Adob​​e AIR 应用程序出现问题。在 PC 上运行 SWF 文件时,应用程序运行良好,我还在 adobe Device Central 中对此进行了测试,它按预期工作。当我将此应用程序安装到我的 HTC Desire HD 安卓设备时,我看到一个带有 5 个点的屏幕,看起来像是一个加载屏幕。

我检查了 logcat 看看发生了什么,似乎有几个参考错误。有人对如何解决这些问题有任何建议吗?

我使用以下命令创建了应用程序

adt -package -target apk-debug -storetype pkcs12 -keystore game.p12 game.apk game-app.xml game.swf icon36.png icon48.png icon72.png

这是我的xml文件的内容

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<application xmlns="http://ns.adobe.com/air/application/2.5">
<id>com.example.game</id>
<versionNumber>1.0.0</versionNumber>
<filename>game</filename>
<name>game</name>
<copyright>me</copyright>
<initialWindow>
<content>game.swf</content>
<visible>true</visible>
<fullScreen>true</fullScreen>
<autoOrients>false</autoOrients>
<aspectRatio>landscape</aspectRatio>
<renderMode>gpu</renderMode>
</initialWindow>
<customUpdateUI>false</customUpdateUI>
<allowBrowserInvocation>false</allowBrowserInvocation>
<icon>
<image36x36>icon36.png</image36x36>
<image48x48>icon48.png</image48x48>
<image72x72>icon72.png</image72x72>
</icon>
<android>
<manifestAdditions><![CDATA[<manifest>

    <uses-permission android:name="android.permission.WAKE_LOCK"/>

</manifest>
]]></manifestAdditions>
</android>
<versionLabel></versionLabel>
</application>

这是我的 logcat 的输出

I/air.com.example.game( 2623): rsl error!
I/air.com.example.game( 2623): numComplete 0
I/air.com.example.game( 2623): numFailed 0
I/air.com.example.game( 2623): numComplete 0
I/air.com.example.game( 2623): failedURLs:
I/air.com.example.game( 2623):   http://fpdownload.adobe.com/pub/swz/tlf/1.0.0.595/textLayout_1.0.0.595.swz
I/air.com.example.game( 2623):   textLayout_1.0.0.595.swz
I/air.com.example.game( 2623): VerifyError: Error #1014: Class flashx.textLayout.container::ContainerController could not be found.
I/air.com.example.game( 2623):
I/air.com.example.game( 2623): ReferenceError: Error #1065: Variable introScreen_18 is not defined.
I/air.com.example.game( 2623):
I/air.com.example.game( 2623): ReferenceError: Error #1065: Variable endScreen_1 is not defined.
I/air.com.example.game( 2623):
I/air.com.example.game( 2623): ReferenceError: Error #1065: Variable TextInput is not defined.
I/air.com.example.game( 2623):
I/air.com.example.game( 2623): ReferenceError: Error #1065: Variable TextInput_upSkin is not defined.
I/air.com.example.game( 2623):
I/air.com.example.game( 2623): ReferenceError: Error #1065: Variable TextInput_disabledSkin is not defined.
I/air.com.example.game( 2623):
I/air.com.example.game( 2623): ReferenceError: Error #1065: Variable Button is not defined.
I/air.com.example.game( 2623):
I/air.com.example.game( 2623): ReferenceError: Error #1065: Variable focusRectSkin is not defined.
I/air.com.example.game( 2623):
I/air.com.example.game( 2623): ReferenceError: Error #1065: Variable Button_upSk
in is not defined.
I/air.com.example.game( 2623):
I/air.com.example.game( 2623): ReferenceError: Error #1065: Variable Button_selectedUpSkin is not defined.
I/air.com.example.game( 2623):
I/air.com.example.game( 2623): ReferenceError: Error #1065: Variable Button_selectedOverSkin is not defined.
I/air.com.example.game( 2623):
I/air.com.example.game( 2623): ReferenceError: Error #1065: Variable Button_selectedDownSkin is not defined.
I/air.com.example.game( 2623):
I/air.com.example.game( 2623): ReferenceError: Error #1065: Variable Button_selectedDisabledSkin is not defined.
I/air.com.example.game( 2623):
I/air.com.example.game( 2623): ReferenceError: Error #1065: Variable Button_over
Skin is not defined.
I/air.com.example.game( 2623):
I/air.com.example.game( 2623): ReferenceError: Error #1065: Variable Button_emphasizedSkin is not defined.
I/air.com.example.game( 2623):
I/air.com.example.game( 2623): ReferenceError: Error #1065: Variable Button_down
Skin is not defined.
I/air.com.example.game( 2623):
I/air.com.example.game( 2623): ReferenceError: Error #1065: Variable Button_disabledSkin is not defined.
I/air.com.example.game( 2623):
I/air.com.example.game( 2623): ReferenceError: Error #1065: Variable ComponentShim is not defined.
I/air.com.example.game( 2623):
I/air.com.example.game( 2623): ReferenceError: Error #1065: Variable Explosion i
s not defined.
I/air.com.example.game( 2623):
I/air.com.example.game( 2623): ReferenceError: Error #1065: Variable Laser is no
t defined.
I/air.com.example.game( 2623):
I/air.com.example.game( 2623): ReferenceError: Error #1065: Variable Enemy is no
t defined.
I/air.com.example.game( 2623):
I/air.com.example.game( 2623): ReferenceError: Error #1065: Variable Player is not defined.
I/air.com.example.game( 2623):
I/air.com.example.game( 2623): ReferenceError: Error #1065: Variable Explode is not defined.
I/air.com.example.game( 2623):
I/air.com.example.game( 2623): ReferenceError: Error #1065: Variable Font_56 is not defined.
I/air.com.example.game( 2623):
I/air.com.example.game( 2623): ReferenceError: Error #1065: Variable MainTimeline is not defined.
I/air.com.example.game( 2623):

【问题讨论】:

    标签: android actionscript-3 air flash-cs5


    【解决方案1】:

    您遇到了 RSL 错误。您可能需要将 .swz 文件与 APK 一起打包。

    转到操作脚本设置运行时共享库​​设置并选择合并到代码中。

    【讨论】:

      【解决方案2】:

      我遇到了同样的问题,输出非常相似:

      Fonts should be embedded for any text that may be edited at runtime, other than text with the "Use Device Fonts" setting. Use the Text > Font Embedding command to embed fonts.
      rsl error!
      numComplete 0
      numFailed 0
      numComplete 0
      failedURLs:
        http://fpdownload.adobe.com/pub/swz/tlf/1.0.0.595/textLayout_1.0.0.595.swz
        textLayout_1.0.0.595.swz
      VerifyError: Error #1014: Class flashx.textLayout.container::ContainerController could not be found.
      
      ReferenceError: Error #1065: Variable soldsign_24 is not defined.
      
      ReferenceError: Error #1065: Variable Font_4 is not defined.
      
      Error opening URL 'http://fpdownload.adobe.com/pub/swz/crossdomain.xml'
      

      我最终按照上面的代码删除了与“Variable soldsign_24”和“Font_4”关联的对象。这解决了编译错误,我能够挽救我的工作。我相信这发生在我身上是因为我使用的字体没有正确链接。希望有帮助:)

      【讨论】:

        猜你喜欢
        • 2023-03-03
        • 1970-01-01
        • 1970-01-01
        • 2021-02-14
        • 1970-01-01
        • 2022-09-25
        • 2013-02-15
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多