【问题标题】:ADOBE AIR : Error #16824 : Version mismatch while trying to auto updateADOBE AIR:错误 #16824:尝试自动更新时版本不匹配
【发布时间】:2011-01-20 14:57:28
【问题描述】:

目标:

所以这是我的问题,我正在尝试将旧版本软件 X v1.0.7 AIR Runtime SDK 2.0 自动更新到新版本 X v1.0.8 AIR Runtime SDK 2.5。

配置 =

旧软件 X 是 1.0.7 版,使用运行时 SDK 2.0。 App.xml 如下:

1.0.7

这个软件 X 就是这样,假设更新到版本 1.0.8,假设使用 AIR 运行时 2.5。

我正在使用带有标签的 update.xml 文件:

1.0.8版本>

计算机是 MacOS X v10.6.6。运行最新的 AIR RUNTIME 2.5

旧软件X的新版本,版本1.0.8,使用app.xml如下:

1.0.8#my hidden publisherID#

软件 X v1.0.8 使用标签 publisherID,因此该软件将被识别为同一软件。

发生了什么?

当我启动旧软件 X v1.0.7 时,它正在尝试更新并引发错误 16824。这个错误假设意味着我的新软件版本与 update.xml 文件中定义的版本不匹配但对我来说,这不是真的……那有什么问题?有人可以帮忙吗?

【问题讨论】:

    标签: air auto-update


    【解决方案1】:

    【讨论】:

      【解决方案2】:

      如果您尝试按照知识库文章中的说明进行操作,您会发现它告诉您做什么,而不是如何。你被告知要包含来自 Air 2.5 / Flex 4.5 的更新的 applicationupdater.swcapplicationupdater_ui.swc,但是最难的部分。

      在 Flash Builder 中执行以下操作:

      1. 转到“项目属性”、“构建路径”
      2. 展开列表中的 Flex 框架并删除 applicationupdater.swcapplcationupdater_ui.swc
      3. 单击“添加 SWC”并从您的 Flex 4.5 框架位置添加这两个文件(在 Mac 上为/Applications/Adobe Flash Builder 4.5/sdks/4.5.0/frameworks/libs/air/applicationupdater.swc)。

      如果您在 Ant 构建文件中使用 mxmlc 任务,这对我有用:

      <target name="compile" depends="css, copy_assets">
        <mxmlc file="${MAIN_SOURCE_FILE}" output="${OUTPUT}/${FLEX_APP_NAME}.swf">
      
          <load-config filename="${FLEX_HOME}/frameworks/air-config.xml"/>
      
          <compiler.source-path  path-element="${APP_ROOT}/src"/>
          <compiler.source-path  path-element="${APP_ROOT}/locale/{locale}"/>
      
          <!-- append=false clears your library-path -->
          <compiler.library-path dir="${FLEX_HOME}" append="false">
            <!-- Now we need to re-add the flex libs -->
            <include name="libs"/>
            <include name="locale/{locale}"/>
          </compiler.library-path>
          <compiler.library-path dir="/" append="true">
            <!-- Add the updater framework from Flex 4.5 / Air 2.6 -->
            <include name="Applications/Adobe Flash Builder 4.5/sdks/4.5.0/frameworks/libs/air/applicationupdater_ui.swc"/>
            <include name="Applications/Adobe Flash Builder 4.5/sdks/4.5.0/frameworks/libs/air/applicationupdater.swc"/>
            <!-- You may need to adjust these paths -->
          </compiler.library-path>
          <compiler.library-path dir="${FLEX_HOME}" append="true">
            <!-- Re-add the rest of the air libs -->
            <include name="libs/air"/>
          </compiler.library-path>
          <compiler.library-path dir="${APP_ROOT}/libs/" append="true">
            <!-- Your custom libraries here -->
          </compiler.library-path>
        </mxmlc>
      </target>
      

      一组等效的命令行选项应该适用于 mxmlc 命令行编译器,但我还没有对此进行测试:

      mxmlc -library-path=$(FLEX_HOME)/libs $(FLEX_HOME)/locale/{locale} \
      $(FLEX45_HOME)/frameworks/libs/air/applicationupdater.swc \
      $(FLEX45_HOME)/frameworks/libs/air/applicationupdater_ui.swc \
      $(FLEX_HOME)/frameworks/libs/air \
      ... your custom libs \
      ... other compiler options
      

      我已经在我的博客上描述了entire process with a bit more background information

      【讨论】:

        【解决方案3】:

        因为我编译的应用程序中的版本号与服务器上 UpdateDescriptor.xml 中的版本号不同,所以我发生了错误。

        在 AIR 应用程序中,版本号在应用程序描述符文件中的标记 versionNumber 下定义:

        <versionNumber>2.3.0</versionNumber>
        

        在服务器上的 UpdateDescriptor.xml 文件中,我有一个不同的编号:

        <?xml version="1.0" encoding="utf-8"?> 
        <update xmlns="http://ns.adobe.com/air/framework/update/description/2.5"> 
            <versionNumber>2.2.1</versionNumber>
            <url>http://www.example.com/project_2.2.1.air</url> 
            <description><![CDATA[List the changes in this version here]]> 
            </description> 
        </update>
        

        导致了这个错误:

        【讨论】:

          猜你喜欢
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 2015-08-04
          • 1970-01-01
          • 2016-12-23
          • 1970-01-01
          • 2021-11-01
          相关资源
          最近更新 更多