简体   繁体   English

Gradle 3.3和最新的构建工具

[英]Gradle 3.3 and latest build tools

Recently I've upgraded Android Studio to version 2.3 and my projects to latest build tools (>=25) and Gradle 3.3. 最近,我将Android Studio升级到了2.3版,并将我的项目升级到了最新的构建工具(> = 25)和Gradle 3.3。 It compiles fine in AS, however every project throws an error when compiled on my Jenkins machine. 它可以在AS中正常编译,但是在我的Jenkins机器上编译时,每个项目都会引发错误。

Depending on the project, error occurs on various tasks, but it's always aapt related 根据项目的不同,错误会在各种任务上发生,但总是与错误相关

Process 'command '/opt/android-sdk-linux/build-tools/25.0.0/aapt'' finished with non-zero exit value 139 进程'命令'/opt/android-sdk-linux/build-tools/25.0.0/aapt''完成,退出值非零139

It recreates both with 25.0.0. 它同时使用25.0.0重新创建。 and 25.0.2. 和25.0.2。 I've compared sdk on my jenkins machine with sdk I have local and both have all the required components - correct version of build-tools, platform-tools, platforms, m2repositories and tools. 我已经将我的jenkins机器上的sdk与我拥有本地的sdk进行了比较,并且都具有所有必需的组件-正确版本的构建工具,平台工具,平台,m2存储库和工具。

Compilation log isn't much helpful as it doesn't provide any info that could help narrow the problem. 编译日志没有太大帮助,因为它没有提供任何有助于缩小问题范围的信息。

Anyone struggled with similar issues or have any idea how to fix it? 任何人都在为类似的问题而苦苦挣扎,或者有任何解决办法的想法?

Cheers, 干杯,

Process 'command '/opt/android-sdk-linux/build-tools/25.0.0/aapt'' finished with non-zero exit value 139 进程'命令'/opt/android-sdk-linux/build-tools/25.0.0/aapt''完成,退出值非零139

When the JVM runs, exit codes up to 127 are reserved for errors with the JVM itself, so when it runs an external process that fails, it adds 128 to the exit code. 当JVM运行时,为JVM自身的错误保留了多达127个退出代码,因此,当它运行失败的外部进程时,它将为退出代码添加128个。 In this case, 139 minus 128 is 11, meaning that aapt exited with signal 11 (SIGSEGV), which is a segmentation fault crash. 在这种情况下,139减128为11,表示aapt退出并发出信号11(SIGSEGV),这是分段错误崩溃。

So it sounds like a problem with aapt itself. 所以这听起来像是aapt本身的问题。 Can you manually run aapt on the Jenkins build machine to see what happens, or if it gives any more information? 您可以在Jenkins构建机器上手动运行aapt来查看会发生什么,还是提供更多信息?

It may be worth reporting this on b.android.com along with the OS, version, and CPU architecture you're running on. 可能值得在b.android.com上报告此信息以及正在运行的OS,版本和CPU体系结构。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM