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:
- I try to understand the .yml file that put we have to put inside the root of the project.
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
- I can build the project successfully all I that see the green flag.
- The last line, as you can see the YML file. We put the line for copy the generated file into the output directory.
- Now my problem is that I could not install or run the generated file into my physical device. I tried numbers of time.
Thank you.