2011-01-20 58 views
2

目的:ADOBE AIR:錯誤#16824:版本不匹配,而試圖自動更新

因此,這裏是我的問題,我想自動更新舊版本的軟件X v1.0.7 AIR運行時SDK 2.0的新版本X v1.0.8 AIR Runtime SDK 2.5。

CONFIGURATION =

Old Software X是使用運行時SDK 2.0的版本1.0.7。 app.xml中如下:

<應用的xmlns = 「http://ns.adobe.com/air/application/2.0」>

<版本> 1.0.7 < /版本>

這個軟件X是這樣的,假設更新到假設使用AIR運行時2.5的版本1.0.8。

im使用關於標記的一個update.xml文件:

<更新的xmlns = 「http://ns.adobe.com/air/framework/update/description/1.0」> <版本> 1.0。 8 < /版本>

計算機是MacOS X v10.6.6。運行最新的AIR運行時2.5

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

<應用的xmlns =「HTTP://ns.adobe。 COM /空氣/應用/ 2.5" > < VERSIONNUMBER> 1.0.8 </VERSIONNUMBER> <的publisherId>#我的隱藏的publisherId#< /的publisherId>

軟件X v1.0.8使用標籤的publisherId所以軟件將被識別爲相同的軟件。

發生了什麼?

當我啓動舊軟件X v1.0.7時,它正在嘗試更新並引發錯誤16824.此錯誤意味着我的新軟件版本與update.xml中定義的版本不匹配文件但對我來說,它不是真的......所以錯在哪裏?任何人都可以幫忙

回答

0

如果你想跟隨知識庫文章中的說明,你會發現,它會告訴你做什麼但不如何來做到這一點。你被告知包含來自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命令行編譯工作,但我的避風港't t testing 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 

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

0

發生了錯誤,因爲我編譯的應用程序中的版本號與服務器上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> 

這導致了這個錯誤:

enter image description here