I am a newbie for making the build process automated in Android app development. For the sake of learning recently start to use Circle CI server in our project. Now directly jump onto the problem see below:
Below is my project YML file.
#
# Build configuration for Circle CI
#
general:
artifacts:
- /home/ubuntu/unideal-android/app/build/outputs/apk/
machine:
environment:
ANDROID_HOME: /usr/local/android-sdk-linux
dependencies:
override:
# Build Tools 25.0.1
- echo y | android update sdk --no-ui --all --filter build-tools-25.0.2,android-25,extra-android-m2repository
# Build Tools 24.0.1
# - echo y | android update sdk --no-ui --all --filter build-tools-24.0.3,android-24,extra-android-m2repository
# # Build Tools 23.0.1
# - echo y | android update sdk --no-ui --all --filter build-tools-23.0.2,android-23,extra-android-m2repository
- ANDROID_HOME=/usr/local/android-sdk-linux ./gradlew dependencies
test:
override:
# start the build
- ./gradlew assembleDebug
# copy the build outputs to artifacts
- cp -r app/build/outputs/ $CIRCLE_ARTIFACTS
Thank you.
Hi I think you need to start the emulator first and then try to run the adb install command please check a part from a article here:
If you start the emulator, you can install your APK on it with something like the following:
test: override: - adb install path/to/build.apk
for more detail check this
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With