Circle CI Automated for Android Project was unable to create an APK file and was not installed on the device

I am new to automatically creating an application creation process in an Android application. For the sake of training, we recently started using the Circle CI server in our project. Now let's move on to the problem, as shown below:

  • I am trying to understand the .yml file that should be placed at the root of the project.

Below is my YML file project.

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

enter image description here

Thanks.

+6
source share
1 answer

Hi, it seems to me that you need to start the emulator first and then try to run the adb installation command, please check part of the article here:

If you run the emulator, you can install the APK on it with something like the following:

test: override: - adb / to / build.apk installation path

for more details check this

+1
source

Source: https://habr.com/ru/post/1014594/


All Articles