Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CircleCi cannot failed to resolve build tools Android

I'm trying to use CircleCi with my Android project i've added the circle.yml file but every time the build fails with the following error

A problem occurred configuring project ':app'. failed to find Build Tools revision 23.0.1

the following is my circle.yml file

#
# 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

i'm targeting SDK version 23 and build tools 23.0.2

like image 260
a3adel Avatar asked Oct 19 '22 01:10

a3adel


1 Answers

I'm target to Sdk 25, and this is my working cicle.yml file:

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,platform-tools,extra-google-m2repository,extra-google-google_play_services,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
like image 108
luizMello Avatar answered Oct 21 '22 04:10

luizMello