Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Circle CI Automated for Android Project could not build the APK file and not installed into the device

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:

  1. 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
  1. I can build the project successfully all I that see the green flag.
  2. The last line, as you can see the YML file. We put the line for copy the generated file into the output directory.
  3. Now my problem is that I could not install or run the generated file into my physical device. I tried numbers of time.

enter image description here

Thank you.

like image 933
Bhavdip Sagar Avatar asked Jan 31 '17 14:01

Bhavdip Sagar


1 Answers

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

like image 88
Anuj J Pandey Avatar answered Oct 17 '22 09:10

Anuj J Pandey