CircleCi无法解决Android的构建工具

前端之家收集整理的这篇文章主要介绍了CircleCi无法解决Android的构建工具前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

我正在尝试将CircleCi与我的Android项目一起使用我添加了circle.yml文件,但每次构建失败并出现以下错误

A problem occurred configuring project ‘:app’.
Failed to find Build Tools revision 23.0.1

以下是我的circle.yml文件

#
# Build configuration for Circle CI
#

general:
    artifacts:
        - /home/ubuntu/ES-NRP-Android-V3/app/build/outputs/apk/

machine:
    environment:
        ANDROID_HOME: /usr/local/android-sdk-linux

dependencies:
pre:
    - echo y | android update sdk --no-ui --all --filter "tools"
    - echo y | android update sdk --no-ui --all --filter "build-tools-23.0.1"
    override:
        - echo y | android update sdk --no-ui --all --filter tools,platform-tools,build-tools-23.0.1,android-23,extra-google-m2repository,extra-google-google_play_services,extra-android-support
        - ANDROID_HOME=/usr/local/android-sdk-linux ./gradlew dependencies

test:
    override:
        - (./gradlew assemble):
timeout: 360

我的目标是SDK版本23和构建工具23.0.2

最佳答案
我的目标是Sdk 25,这是我工作的cicle.yml文件

general:
    artifacts:
          - /home/ubuntu/your-app-name/app/build/outputs/apk/

machine:
    environment:
        ANDROID_HOME: /usr/local/android-sdk-linux


dependencies:
    pre:
        - echo y | android update sdk --no-ui --all --filter tools,extra-android-support,android-25
        - echo y | android update sdk --no-ui --all --filter build-tools-25.0.0               
        - if [ ! -d "/usr/local/android-sdk-linux/platforms/android-25" ]; then echo y | android update sdk --no-ui --all --filter "android-25"; fi
        - if [ ! -d "/usr/local/android-sdk-linux/build-tools/25.0.0" ]; then echo y | android update sdk --no-ui --all --filter "build-tools-25.0.0"; fi
        - if [ ! -d "/usr/local/android-sdk-linux/extras/android/m2repository/com/android/support/design/25.0.0" ]; then echo y | android update sdk --no-ui --all --filter "extra-android-m2repository"; fi


    cache_directories:
        - /usr/local/android-sdk-linux/tools
        - /usr/local/android-sdk-linux/build-tools/25.0.0
        - /usr/local/android-sdk-linux/platforms/android-25
        - /usr/local/android-sdk-linux/extras/android/m2repository
test:
    override:
        - ./gradlew assemble
        - cp -r app/build/outputs $CIRCLE_ARTIFACTS
原文链接:https://www.f2er.com/android/430058.html

猜你在找的Android相关文章