gpt4 book ai didi

android - 为什么 Travis CI 会终止我脚本的进程?

转载 作者:行者123 更新时间:2023-11-29 20:56:56 24 4
gpt4 key购买 nike

我添加了以下配置来运行Travis CIFahrplan 上安卓项目:

language: android

android:
components:

# All the build system components should be at the latest version
# - tools
# - platform-tools
- build-tools-21.1.1
- android-19
- sysimg-19
- add-on
- extra

# The libraries we can't get from Maven Central or similar
- extra-android-support
- extra-android-m2repository

jdk:
- oraclejdk7
- openjdk7

notifications:
email: true

before_script:
- chmod +x gradlew
- mv app/gradle.properties.example app/gradle.properties

script:
- ./gradlew clean assembleDebug

由于某种原因,进程一次又一次地被终止,如 build history 中所示。 .它停在不同的位置。错误消息不是那么有用:

The command "./gradlew clean assembleDebug" exited with 137

最佳答案

只有检查 gradle 版本才能在运行脚本之前强制下载(帮助我避免错误 137)但现在我使用 wrapper 所以 gradle-wrapper.jar 已更新。

如果还是不行,你可以试试先下载android依赖再运行脚本,再清理一下。

我认为默认情况下它们不会组装,但我喜欢覆盖安装阶段以确保。

在我的例子中,错误 137 是由于并发(构建/模拟器)和 Travis-ci 杀死的作业。我通过这种类型的更改解决了它,但我不太了解。

language: android

jdk:
- oraclejdk7
- openjdk7

android:
components:

# All the build system components should be at the latest version
- tools
- platform-tools
- build-tools-21.1.1
- android-19

# The libraries we can't get from Maven Central or similar
- extra-android-support
- extra-android-m2repository


notifications:
email: true

before_install:
# Disable services enabled by default
# http://docs.travis-ci.com/user/database-setup/#MySQL
- sudo /etc/init.d/mysql stop
- sudo /etc/init.d/postgresql stop
# The following did not work reliable
# - sudo service mysql stop
# - sudo service postgresql stop

install:
# Ensure Gradle wrapper is executable, download wrapper and show version
- chmod +x ./gradlew; ls -l gradlew; ./gradlew wrapper -v
# Download and show android dependencies
# - ./gradlew androidDependencies

before_script:
# Ensure signing configuration is present
- mv app/gradle.properties.example app/gradle.properties

script:
- ./gradlew clean assembleDebug

关于android - 为什么 Travis CI 会终止我脚本的进程?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27377615/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com