CircleCi move to version 2


#1

I got this error

track : internal
WARNING: Configuration ‘compile’ is obsolete and has been replaced with ‘implementation’.
It will be removed at the end of 2018

FAILURE: Build failed with an exception.

  • What went wrong:
    A problem occurred configuring project ‘:app’.

SDK location not found. Define location with sdk.dir in the local.properties file or with an ANDROID_HOME environment variable.

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

BUILD FAILED in 45s
Exited with code 1

My config.yml

track : internal
WARNING: Configuration ‘compile’ is obsolete and has been replaced with ‘implementation’.
It will be removed at the end of 2018

FAILURE: Build failed with an exception.

  • What went wrong:
    A problem occurred configuring project ‘:app’.

SDK location not found. Define location with sdk.dir in the local.properties file or with an ANDROID_HOME environment variable.

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

BUILD FAILED in 45s
Exited with code 1version: 2
jobs:
build:
working_directory: ~/code
docker:
- image: circleci/android:api-25-alpha
environment:
JVM_OPTS: -Xmx3200m
steps:
- checkout
- restore_cache:
key: jars-{{ checksum “build.gradle” }}-{{ checksum “app/build.gradle” }}
- run:
name: Download Dependencies
command: |
sudo chmod +x gradlew
./gradlew dependencies
- run:
name: Setup emulator
command: sdkmanager “system-images;android-21;default;armeabi-v7a” && echo “no” | avdmanager create avd -n test -k “system-images;android-21;default;armeabi-v7a”
- run:
name: Launch emulator
command: export LD_LIBRARY_PATH={ANDROID_HOME}/emulator/lib64:{ANDROID_HOME}/emulator/lib64/qt/lib && emulator64-arm -avd test -noaudio -no-boot-anim -no-window -accel on
background: true
- run:
name: Wait Emulator
command: circle-android wait-for-boot
- save_cache:
paths:
- ~/.gradle
key: jars-{{ checksum “build.gradle” }}-{{ checksum “app/build.gradle” }}
- run:
name: Run Tests
command: ./gradlew app:testVerifyDebugUnitTest --stacktrace -PdisablePreDex --console=plain
timeout: 120000
- store_artifacts:
path: app/build/reports
destination: reports
- store_test_results:
path: app/build/test-results

deploy-internal:
machine:
enabled: true
steps:
- checkout
- run:
name: Deploy into internal test
command: |
sudo chmod +x gradlew
./gradlew publishApkDevelopRelease -PdisablePreDex -Dtrack=internal

deploy-alpha:
machine:
enabled: true
steps:
- checkout
- run:
name: Deploy into alpha
command: |
sudo chmod +x gradlew
./gradlew publishApkDevelopRelease -PdisablePreDex -Dtrack=alpha

workflows:
version: 2
build-deploy:
jobs:
- build
- deploy-internal:
requires:
- build
filters:
branches:
only: internal_test
- deploy-alpha:
requires:
- build
filters:
branches:
only: alpha


#2

To make this question readable, please:

  • Click the edit button
  • Apply code/block formatting to the log output
  • Introduce the second section (starting from version: 2) as your config
  • Apply code/block formatting to your config

Thanks!


#3

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.