开发者

ADOBE AIR : Error #16824 : Version mismatch while trying to auto update

OBJECTIVE :

So here is my problem, I am trying to auto-update an old version software X v1.0.7 AIR Runtime SDK 2.0 to a new version X v1.0.8 AIR Runtime SDK 2.5.

CONFIGURATION =

Old Software X is version 1.0.7 using runtime SDK 2.0. App.xml as follow :

<application xmlns="http://ns.adobe.com/air/application/2.0">

<version>1.0.7</version>

This software X is so, suppose to update to version 1.0.8 which suppose to use the AIR runtime 2.5.

Im using an update.xml file with tags :

<update xmlns="http://ns.adobe.com/air/framework/update/description/1.0"> <version>1.0.8</version>

The computer is MacOS X v10.6.6. running the latest AIR RUNTIME 2.5

The new version of the old software X, version 1.0.8, is using an app.xml as follow :

<application xmlns="http://ns.adobe.com/air/application/2.5"> <ve开发者_高级运维rsionNumber>1.0.8</versionNumber> <publisherID>#my hidden publisherID#</publisherID>

The software X v1.0.8 is using the tag publisherID so the software would be recognized as the same software.

WHAT HAPPEN ?

When I launch the old software X v1.0.7, it is trying to update and raise the error 16824. This error is suppose to mean that my version of the new software does not match the version defined in the update.xml file but to me, its not true... so what is wrong ? Anyone can help ?


The solution is here :

http://kb2.adobe.com/cps/873/cpsid_87300.html


If you're trying to follow the instructions in the knowledge base article, you'll find that it tells you what to do but not how to do it. You're told to include the updated applicationupdater.swc and applicationupdater_ui.swc from Air 2.5 / Flex 4.5 but that is the hardest part.

In Flash Builder do this:

  1. Go to "Project Properties", "Build Path"
  2. Unfold the Flex Framework in the list and remove applicationupdater.swc and applcationupdater_ui.swc.
  3. Click "Add SWC" and add those two files from your Flex 4.5 framework location (/Applications/Adobe Flash Builder 4.5/sdks/4.5.0/frameworks/libs/air/applicationupdater.swc on Mac).

If you're using the mxmlc task in an Ant buildfile, this has worked for me:

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

An equivalent set of commandline options should work for the mxmlc command line compiler, but I haven't tested this:

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

I have described the entire process with a bit more background information on my blog.


The error occurred for me because versions number in my compiled application was different than the version number in the UpdateDescriptor.xml on the server.

In an AIR application the version number is defined in the application descriptor file under the tag versionNumber:

<versionNumber>2.3.0</versionNumber>

In the UpdateDescriptor.xml file on the server I had a different number:

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

It resulted in this error:

ADOBE AIR : Error #16824 : Version mismatch while trying to auto update

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜