是什么造成此错误:"在空气/ Android的SDK组件/设备/ Runtime.apk是过时和QUOT的; [英] What's causing this error: "SDK component at air/android/device/Runtime.apk is out of date"

查看:174
本文介绍了是什么造成此错误:"在空气/ Android的SDK组件/设备/ Runtime.apk是过时和QUOT的;的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前工作的一个Adobe AIR项目,为iOS和Android。
我们自动生成的东西与詹金斯运行Ant构建脚本。它封装应用程序的基于不同的编译(释放和测试版本)和测试的版本的不同版本获得甚至包装在其中多个不同的configs。

I'm currently working on an Adobe AIR project, for iOS and Android.
We automatically build the thing with Jenkins running an ANT build script. It packages different versions of the application based on different compiles (release and test versions) and the test versions get even more different configs packaged in them.

到目前为止,一切都很好。构建工作在我运行Ant 1.8.4结合AIR 3.6 SDK的本地机器。

So far, so good. The build works on my local machine running ANT 1.8.4 combined with the AIR 3.6 SDK.

现在的问题是,是的有时或最近的的大部分时间,詹金斯机器上(一台Mac Mini)构建失败,出现错误信息,如下图所示:

The problem is, that sometimes, or lately most of the time, on the Jenkins machine (a Mac Mini) the build fails with an error message as seen below:

package-android-versions:
   [delete] Deleting directory /private/var/jenkins/workspace/**********/dist/android/release
    [mkdir] Created dir: /private/var/jenkins/workspace/*************/dist/android/release
     [echo] packaging for android...
     [echo] done
   [delete] Deleting directory /private/var/jenkins/workspace/************/dist/android/test/dummy
    [mkdir] Created dir: /private/var/jenkins/workspace/**************/dist/android/test/dummy
     [echo] packaging for android...
     [java] SDK component at air/android/device/Runtime.apk is out of date

正如您可能会注意到,第一包命令成功,因此它不能真正成为我的SDK组件是过时的。然后第一个包命令就会失败了。

As you may notice, the first package command succeeds so it can't really be that my SDK component is out of date. Then the first package command would have failed too.

下面是相关的ANT构建命令:

Below is the relevant ANT build command:

        <echo>packaging for android...</echo>
        <java jar="${AIR_SDK_HOME}/lib/adt.jar" fork="true" failonerror="true">
            <jvmarg line="-Xmx1024m" />
            <jvmarg line="-XX:MaxPermSize=2048m" />
            <arg line="-package"/>
            <arg line="-target apk-captive-runtime"/>
            <arg line="-storetype pkcs12 -keystore '${dir.portal}/self-signed.p12' -storepass ******"/>
            <arg line="'@{destination}/${app.name}@{label}' '@{source}/${app.descriptor}'" />
            <arg line="-C '@{source}' ."/>
            <arg line="-C '${dir.assets.runtime.android}' ."/>
        </java>
        <echo>done</echo>

我已经试过增加可用内存量,以java命令(因为很多时候这是失败在我的经验的原因),但是这不是这里的解决方案。

I've tried increasing the amount of memory available to the java command (because very often that's a cause of failures in my experience) but that's not the solution here.

另外,我看了看回答<一href="http://stackoverflow.com/questions/15061151/error-sdk-component-at-air-android-device-runtime-apk-is-out-of-date">this类似的问题但是我们的构建机器不去拿编译和打包的咖啡,所以不能成为真正的答案;)

Also, I've looked at the answer to this similar question but our build machine doesn't go get coffee between compiling and packaging, so that can't be the real answer ;)

任何其他的想法?

推荐答案

我做了一些调查:adt.jar是启动一个单独的进程得到Runtime.apk使用的lib /安卓/斌/ AAPT Android的版本信息。它看起来像这个单独的进程中调用和/或它的输出可能是这里的罪魁祸首阅读。

I did some investigation: adt.jar is launching a separate process to get the Android version info from Runtime.apk using lib/android/bin/aapt. It looks like the invocation of this separate process and/or the reading of its output could be the culprit here.

如果没有实际得到的源adt.jar的编译版本,并增加额外的调试信息,我不能确定这是问题,但它看起来很像吧。触发错误可能是影响线程或文件读取设备,它基本上是任何系统活动上的任何东西。

Without actually getting the source for adt.jar in a compilable version and adding extra debug info I can't be certain this is the issue, but it looks a lot like it. Triggers for errors could be anything on the machine that influences threads or file-reading, which is basically any system activity.

在AIR SDK 3.8 adt.jar包括在外部进程启动,以确保AAPT命令的输出完全读取区域的微小变化。

The adt.jar in AIR SDK 3.8 includes a small change in the area where the external process is launched to make sure the output of the aapt command is fully read.

升级到3.8可能会解决这个问题,并没有adt.jar的3.6版的修改不能被修复。

Upgrading to 3.8 will probably fix the issue, and without modification of adt.jar the 3.6 version cannot be fixed.

PS:哈谢了! : - )

PS: Ha Frank! :-)

这篇关于是什么造成此错误:&QUOT;在空气/ Android的SDK组件/设备/ Runtime.apk是过时和QUOT的;的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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