Giter Club home page Giter Club logo

android-orb's Introduction

Android Orb CircleCI Build Status CircleCI Orb Version GitHub License CircleCI Community

An orb for working with Android on CircleCI. Supports running UI tests that use the Android emulator, using the Android machine image which is currently in preview status: https://github.com/CircleCI-Public/android-image-preview-docs

Usage

For full usage guidelines, see the orb registry listing.

Documentation

See the following links for more information about building Android projects on CircleCI.

See the following links for more information about using CircleCI orbs:

Contributing

We welcome issues to and pull requests against this repository!

For further questions/comments about this or other orbs, visit CircleCI's orbs discussion forum.

android-orb's People

Contributors

brentmmarks avatar ericribeiro avatar felicianotech avatar guillaume-tgl avatar iynere avatar jaryt avatar jkzilla avatar kevnm67 avatar lokst avatar marcomorain avatar msfstef avatar ryanbourdais avatar tadashi0713 avatar teesloane avatar teka23 avatar thatfiredev avatar wenzdey avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

android-orb's Issues

cgroup changed for latest orb version?

Orb version

[email protected]

What happened

When upgraded from 2.1.2 to 2.3.0, started seeing the following error:

cat: /sys/fs/cgroup/memory/memory.max_usage_in_bytes: No such file or directory

for my command


          name: Log memory usage
          command: cat /sys/fs/cgroup/memory/memory.max_usage_in_bytes | awk -v var=" GB" '{printf $1/1000000000; printf var}'

Link

Expected behavior

Either keep working or documentation where cgroups changes is visibe?

NDK path is not correct

Orb version

2.5.0

What happened

I have this step in my CircleCI config:

- android/install-ndk:
          version: "26.2.11394342"

Expected behavior

The issue is that ANDROID_NDK_HOME is set to /opt/android/26.2.11394342 whereas the NDK is installed at path /opt/android/sdk/ndk/26.2.11394342.

See the corresponding faulty code:

  if [[ -d "${HOME}/android-sdk/ndk/${PARAM_VER}" ]]; then
    android_ndk_home="$HOME/android-sdk/ndk/${PARAM_VER}"
  elif [[ -d "/opt/android/sdk/ndk/${PARAM_VER}" ]]; then
    android_ndk_home="/opt/android/${PARAM_VER}"

Google play services not available after upgrading

Orb version

version: 2.1
orbs:
  android: circleci/[email protected]

...
jobs:
  android-test:
    executor:
      name: android/android-machine
      resource-class: xlarge
    steps:
      - checkout
      - android/start-emulator-and-run-tests:
          test-command: ./gradlew android-auto:connectedDebugAndroidTest
          system-image: system-images;android-30;google_apis;x86
      - run:
          name: Save test results
          command: |
            mkdir -p ~/mapbox_test/
            adb pull sdcard/Download/mapbox_test ~/mapbox_test/
          when: on_fail
      - store_artifacts:
          path: ~/mapbox_test/

What happened

We are updating our compile version to 30 in an app. But a test checking for isGooglePlayServicesAvailable started failing after this upgrade.

android {
-    compileSdkVersion(29)
+    compileSdkVersion(30)

    defaultConfig {
        applicationId = "com.mapbox.app"
        minSdkVersion(23)
-        targetSdkVersion(29)
+       targetSdkVersion(30)
}
class LocationEngineProviderTest {

    @Test
    fun checkGooglePlayServicesAvailable() {
        val activityScenario = launchActivity<NavigationTestActivity>()
        activityScenario.onActivity { activity ->
            Assert.assertEquals(
                "Google location services have to be available",
                ConnectionResult.SUCCESS,
                GoogleApiAvailability.getInstance().isGooglePlayServicesAvailable(activity)
            )
        }
    }
}

Expected behavior

The LocationEngineProviderTest should pass because we want to test integrations with google play services

Android Gradle plugin requires Java 17 to run. You are currently using Java 11.

Orb version

circleci/[email protected]

What happened

We recently updated our android application and gradle project to use gradle 8.0, on our machines everything is working correctly, but while running the project in circleCI we are receiving that error.

is there a way to add java 17 to the Android Orb machine? any plans to add java 17 by default?

  • Where:
    Build file '/home/circleci/project/app/build.gradle' line: 3

  • What went wrong:
    A problem occurred evaluating project ':app'.

Failed to apply plugin 'com.android.internal.application'.
Android Gradle plugin requires Java 17 to run. You are currently using Java 11.
Your current JDK is located in /usr/lib/jvm/java-11-openjdk-amd64
You can try some of the following options:
- changing the IDE settings.
- changing the JAVA_HOME environment variable.
- changing org.gradle.java.home in gradle.properties.

Expected behavior

CircleCi could provide a new Android Orb Version with Java 17 for projects using gradle 8.0

`wait-for-emulator` hangs on Android API Level 31

Orb version

2.1.2

What happened

After starting an emulator with the system image system-images;android-31;default;x86_64, the wait-for-emulator command seems to hang indefinitely:

Waiting for Device.* daemon not running; starting now at tcp:5037
* daemon started successfully
..............
Device is ready after 28 seconds
Waiting for Shell.
Shell is ready after 28 seconds
Waiting for Boot animation complete.....................
Boot animation complete is ready after 70 seconds
Waiting for Boot animation exited................................................................................................................................................................................................................................................................................................................................................................................................

Steps to reproduce

I have reproduced this problem with a minimal config, and you can see in this workflow that this succeeds pretty quickly on the Android 30 image, but bumping it to 31 makes it hang.

Java 17 is not being set to the environment

Orb version

2.3.0

What happened

The documentation states that 17 is now the default, but 11 was still being applied. My build.gradle files are targeting Java 17, but ran into the same problem so I tried to explicitly set java 17 in the config.yml, and then this error occurred. Either way, I'm unable to have a proper JAVA17 environment in circleci.

  build_debug_job:
    <<: *android_config
    steps:
      - checkout
      - android/change-java-version:
          java-version: 17
#!/bin/bash -eo pipefail
#!/bin/bash
 CURRENT_JAVA_VER="$( java -version 2>&1 | head -1 | cut -d'"' -f2 | sed '/^1\./s///' | cut -d'.' -f1 )"
        CURRENT_JAVAC_VER="$( javac -version 2>&1 | head -1 | cut -f 2- -d ' ' | sed '/^1\./s///' | cut -d'.' -f1 )"
        echo "Current Java Version: $CURRENT_JAVA_VER"
        echo "Current Java Compiler Version : $CURRENT_JAVAC_VER"
        if [ "$CURRENT_JAVA_VER" -ne "${PARAM_JAVA_VER}" ]; then
          if [ "${PARAM_JAVA_VER}" -eq 8 ] || [ "${PARAM_JAVA_VER}" -eq 17 ]; then
            if [ "${PARAM_JAVA_VER}" -eq 8 ]; then
              sudo update-alternatives --set java /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java
            else
              sudo update-alternatives --set java /usr/lib/jvm/java-17-openjdk-amd64/bin/java
            fi
            sudo update-alternatives --set javac /usr/lib/jvm/java-"${PARAM_JAVA_VER}"-openjdk-amd64/bin/javac
          else
            sudo apt install openjdk-"${PARAM_JAVA_VER}"-jdk
            sudo update-alternatives --set javac /usr/lib/jvm/java-"${PARAM_JAVA_VER}"-openjdk-amd64/bin/javac
            sudo update-alternatives --set java /usr/lib/jvm/java-"${PARAM_JAVA_VER}"-openjdk-amd64/bin/java
          fi
          echo "export JAVA_HOME=/usr/lib/jvm/java-${PARAM_JAVA_VER}-openjdk-amd64" >> ~/.bashrc
          echo "export PATH=$JAVA_HOME/bin:$PATH" >> ~/.bashrc
        fi
        NEW_JAVA_VER="$( java -version 2>&1 | head -1 | cut -d'"' -f2 | sed '/^1\./s///' | cut -d'.' -f1 )"
        NEW_JAVAC_VER="$( javac -version 2>&1 | head -1 | cut -f 2- -d ' ' | sed '/^1\./s///' | cut -d'.' -f1 )"
        echo "New Java Version : $NEW_JAVA_VER"
        echo "New Java Compiler Version : $NEW_JAVAC_VER"
Current Java Version: 11
Current Java Compiler Version : 11
update-alternatives: error: alternative /usr/lib/jvm/java-17-openjdk-amd64/bin/java for java not registered; not setting

Exited with code exit status 2
CircleCI received exit code 2

Expected behavior

JAVA 17 circleci environment should be configured to be able to resolve compile time errors related to the Gradle 8.0's requirements.

Job rejected because resource class doesn't exist for android-machine with latest orb version

Orb version

2.3.0

What happened

I wanted to upgrade all of our CI executor images to the newest ones. When specifying version 2023.10.2, CircleCI fails with the error:
Job was rejected because resource class xlarge, image android:2023.10.2 is not a valid resource class .

This happens only for the android-machine executor; android-docker runs with this version.

As per the official docs, both android-docker and android-machine support the resource class and many others:

https://circleci.com/developer/orbs/orb/circleci/android#executors-android-docker

https://circleci.com/developer/orbs/orb/circleci/android#executors-android-machine

After testing more, all versions after 2023.08.1 fail in the same exact way. The resource class just doesn't exist for the later images.

Expected behavior

The CI pipelines should run normally without any errors.

Our config (the important parts)

version: 2.1

orbs:
  android: circleci/[email protected]

jobs:
    android-test:
      executor:
        name: android/android-machine
        resource-class: xlarge
        tag: 2023.10.2

Here's the excerpt from the official docs:

parameters:
  resource-class:
    default: medium
    description: Resource class used for the executor.
    enum:
      - small
      - medium
      - medium+
      - large
      - xlarge
      - 2xlarge
      - 2xlarge+
    type: enum
  tag:
    description: >
      The Android image tag to use.

      Choose a tag from
      https://circleci.com/developer/images/image/cimg/android#image-tags.
    type: string

curl: (16) Error in the HTTP2 framing layer when installing NDK

Orb version

circleci/[email protected]

What happened

New issue appeared on Circle since few days when I install the NDK. This error is not always displayed, maybe 50% of our builds are concerned. I have tried the ndk r21d and the error is the same.

- android/install-ndk: ndk-version: android-ndk-r19c

Error shown in circle
`#!/bin/bash -eo pipefail
[ -w /usr/local/bin ] && SUDO="" || SUDO=sudo

$SUDO curl --silent --show-error --location --fail --retry 3
--output /tmp/android-ndk-r19c.zip
https://dl.google.com/android/repository/android-ndk-r19c-linux-x86_64.zip

$SUDO echo "fd94d0be6017c6acbd193eb95e09cf4b6f61b834 /tmp/android-ndk-r19c.zip" > /tmp/android-ndk-r19c.zip.sha1

sha1sum -c /tmp/android-ndk-r19c.zip.sha1

$SUDO unzip -q /tmp/android-ndk-r19c.zip -d /opt/android
$SUDO rm -f /tmp/android-ndk-r19c*

$SUDO chown -R circleci:circleci /opt/android/android-ndk-r19c

echo "export ANDROID_NDK_HOME=/opt/android/android-ndk-r19c" >> $BASH_ENV

if [[ -d /opt/android/android-ndk-r19c &&
-n "$(ls -A /opt/android/android-ndk-r19c)" ]]; then
echo "Android NDK installed"
else
echo "Android NDK did not install successfully"
exit 1
fi
curl: (16) Error in the HTTP2 framing layer

Exited with code exit status 16
CircleCI received exit code 16`

Expected behavior

Should install the ndk as usual

Include RC009 in the review step inside the "config.yml"

Orb version

v2.0.3

What happened

In #35, the RC009 was included in the exclusion list of the orb tools review. This review checks if there are commands with more than 64 characters (i.e. shell inside the yaml).

Orb development best practices dictate that shell should be inside .sh files, therefore, commands inside the yaml, should not contain code.

Expected behavior

Commands with more than 64 characters of shell code should be extracted to their own .sh file and the RC009 review should not be excluded.

Latest Orb Does Not Work

Orb version

2.3.0

What happened

Fails to start emulator on docker image due to GPU, no settings on gpu work.

Starting emulator with arguments -gpu swiftshader_indirect 
INFO    | Android emulator version 32.1.14.0 (build_id 10330179) (CL:N/A)
INFO    | Found systemPath /home/circleci/android-sdk/system-images/android-30/google_apis/x86/
INFO    | Storing crashdata in: /tmp/android-unknown/emu-crash.db, detection is enabled
INFO    | Duplicate loglines will be removed, if you wish to see each indiviudal line launch with the -log-nofilter flag.
WARNING | Please update the emulator to one that supports the feature(s): Vulkan
WARNING | Failed to process .ini file /home/circleci/.android/avd/test.avd/quickbootChoice.ini for reading.
ERROR   | x86 emulation currently requires hardware acceleration!
CPU acceleration status: KVM requires a CPU that supports vmx or svm
More info on configuring VM acceleration on Linux:
https://developer.android.com/studio/run/emulator-acceleration#vm-linux
General information on acceleration: https://developer.android.com/studio/run/emulator-acceleration.

Exited with code exit status 1

Using android-machine the emulator looks like it does start and then fails because it can't connect add.

    executor:
      name: android/android-machine
      resource-class: 2xlarge
      tag: 2023.07.1

ERROR   | Unable to connect to adb daemon on port: 5037
INFO    | Revoking microphone permissions for Google App.
INFO    | Wait for emulator (pid 3618) 20 seconds to shutdown gracefully before kill;you can set environment variable ANDROID_EMULATOR_WAIT_TIME_BEFORE_KILL(in seconds) to change the default value (20 seconds)

Using an example from https://dev.to/roselinebassey/android-automate-instrumented-and-unit-tests-with-circleci-1igo fails too!

  test_ui:
    steps:
      # Then start the emulator and run the Instrumentation tests!
      - run:
          name: installing emulator and Running Instrumentation tests
          command:  |
            sdkmanager "platform-tools" "platforms;android-29" "build-tools;30.0.0" "emulator"
            sdkmanager "system-images;android-29;google_apis;x86"
            echo no | avdmanager create avd -n test-emulator -k  "system-images;android-29;google_apis;x86"
            emulator -avd test-emulator -noaudio -no-boot-anim -gpu off -no-window &
            adb wait-for-device shell 'while [[ -z $(getprop sys.boot_completed) ]]; do sleep 1; done;'
            adb shell wm dismiss-keyguard
            sleep 1
            adb shell settings put global window_animation_scale 0
            adb shell settings put global transition_animation_scale 0
            adb shell settings put global animator_duration_scale 0
            ./gradlew connectedAndroidTest


Expected behavior

Emulator should run and tests run

Save-grade-cache command fails when /tmp/gradle_cache_seed file does not exists.

Orb version

2.0.3

What happened

The save-gradle-cache command expects a /tmp/gradle_cache_seed file to exist, to generate a cache key.

key: gradle-<< parameters.cache-prefix>>-{{ arch }}-{{ checksum "/tmp/gradle_cache_seed" }}

I am not sure the rationale for this hardcoded value, but for builds where this file is not existing, the command will fail.
This can affect using the start-emulator-and-run-tests command as well, since it calls on the save-gradle-cache command by default.

Expected behavior

Perhaps allow this file to be configurable, via a parameter?

Using newer version of Android SDK causes emulator booting for too long

Orb version

circleci/[email protected]
Config file: https://github.com/facebook/react-native/blob/600d1d4435869fb861cd8c28a685cac1b54eec11/.circleci/config.yml.
Job: test_e2e_android

What happened

In React Native repository, we're implementing E2E tests, for this we need to launch Android emulator, the problem is when I try launching emulators with newer SDK the CI is booting emulator for too long. I tried with SDK 33, 32, 31, 30, see here. It worked with SDK 29, but this is quite old and we wouldn't like to use it.

Expected behavior

Booting emulator should not take so long.

KTS build files not included in cache keys

In restore-gradle-cache.yml, the default find only takes into consideration build.gradle. It should also look for build.gradle.kts by default along with settings.gradle and settings.gradle.kts.

Cannot run Android tests

Hi we are running android tests (UI test) succesfully using circle ci with a Medium machine.
We try to use your orb in order to clean up the .circleci/config.yml file but we get the following error:
image

New config.yml file:
image

thanks for your help

Options "no-output-timeout" not being used by run-tests command

Orb version

2.2.0

What happened

Added no-output-timeout parameter to start-emulator-and-run-tests and noticed that it still timed out at 10m despite having it set to 1h.

Example:

- android/start-emulator-and-run-tests:
          avd-name: android-phone-32
          additional-avd-args: "-d pixel_6"
          system-image: system-images;android-32;google_apis;x86_64
          no-output-timeout: 1h
          ...etc

Expected behavior

Should actually set the no output timeout of the test command.

Proposed solution

Created a small PR #69 to solve this as it seems that the no-output-timeout parameter from start-emulator-and-run-tests is being passed to run-tests, but run-tests is not actually setting it on the command running the run-tests script.

NDK installed, but apparently didn't?

Orb version

1.0.3

Config:

CI Config:

      - android/install-ndk:
          ndk-version: android-ndk-r21e
          ndk-sha: c3ebc83c96a4d7f539bd72c241b2be9dcd29bda9

Gradle release config:

android {
    compileSdkVersion 29
    ndkVersion "21.4.7075529"

    buildTypes {
        release {
            ndk {
                debugSymbolLevel 'FULL'
            }
        }
    }
}

What happened

/tmp/android-ndk-r21e.zip: OK
Android NDK installed
CircleCI received exit code 0

Successful install. Great!

[22:07:13]: ▸ FAILURE: Build failed with an exception.
[22:07:13]: ▸ * What went wrong:
[22:07:13]: ▸ Execution failed for task ':app:extractReleaseNativeDebugMetadata'.
[22:07:13]: ▸ > NDK is not installed

Nope, not installed.

Expected behavior

NDK is, in fact installed - and works. Is there something that was missed here?

Issues with android images

Orb version 1.0.3

What happened

tried using different images from the default 29 in the examples.

android-30, android-S were not found. android-24 was found but gradle skipped my tests.

Expected behavior

Find the images that are requested.

Add adb pull destination folder

Based off #54, pulling screenshots has proven difficult without providing a destination for the adb pull command. Adding a parameter for users to specify and therefore persist the artifacts will be helpful for testing

android orb version 1 was able to digest and use matrix job parameters, now fails with The value of `name` must be a string

Orb version

2.0.3

What happened

android orb version 1 was able to digest and use matrix job parameters in the run ui tests step (### Expected behavior)
- android/run-ui-tests:
matrix:
parameters:
system-image:
- system-images;android-30;default;x86_64
#- system-images;android-31;default;x86_64 // Test with newest release
name: "Test Android UI: <<matrix.system-image>>"

now fails with:

circleci config validate
Error: Error calling workflow: 'build_test_deploy'
Error calling job: 'android/run-ui-tests'
Unexpected executor invocation format
The value of `name` must be a string
Examples of correct executor invocation:
  executor: string-executor-name
  executor: {name: string-executor-name}
  executor: << parameters.executor-type-parameter >>

Update sdk version to include sdk 30

Orb version

0.2.3

What happened

SDK 30 is officially released. Would be great to include it as an enum for the sdk-version parameter for the android executor.

pre-test-command gets error `environment: line 8: mvn: command not found`

Orb version 2.3.0

What happened

I got error when using pre-test-command
My config.yml step:

      - android/run-tests:
          max-tries: 1
          pre-test-command: source /etc/environment
          test-command: mvn clean test -DxmlFile=testngCompileCode.xml

CircleCI: https://app.circleci.com/pipelines/github/checkout51/c51-mobile-automation/1962/workflows/66f134f6-60fd-4e6d-9457-93d398acfe4e/jobs/6818

Error in CircleCI:

Starting test attempt 1
environment: line 8: mvn: command not found
Max tries reached (1)

Exited with code exit status 1
CircleCI received exit code 1

Expected behavior

pre-test-command: source /etc/environment should work

Trying to create AVD in the background results in failure

Orb version:
android: circleci/[email protected]

This is what i have in my config.file:
- android/create-avd:
system-image: "system-images;android-29;google_apis;x86"
avd-name: Pixel_2_API_29
install: true

Trying to add the background: true attribute to the step resulted with a failure when executing "circleci config validate", as follows, as the attribute is unnexpected:
https://discuss.circleci.com/t/create-avd-in-the-background/46840/2

`circleci/android:api` images depreciation

Hello,

It seems like the circleci/android:api-<version> images that this orb uses will be getting deprecated by CircleCI on December 31st.

Sources:
https://discuss.circleci.com/t/legacy-convenience-image-deprecation/41034
https://circleci.com/blog/announcing-our-next-generation-convenience-images-smaller-faster-more-deterministic/
https://circleci.com/developer/images/image/cimg/android

This should probably be migrated to use the new cimg/android images.

android/create-google-play-key does not print contents of the environment variable to JSON file

Orb version

2.2.0

What happened

The contents of the keystore properties JSON file created in the android/create-google-play-key step is just the name of the environment variable used to store the JSON, e.g. "GOOGLE_PLAY_KEY".

Expected behavior

The file should contain the JSON data stored in the $GOOGLE_PLAY_KEY environment variable.

Looks like a case of echo GOOGLE_PLAY_KEY > google-play-key.json instead of echo $GOOGLE_PLAY_KEY > google-play-key.json.

Happy to jump in with a PR here if someone can just confirm that I'm not mistaken!

add parallelism connected to test splitting

Orb version

is there a way to map defined modules to the result of the circleci test split command output to $TESTFILES to run the correct set of modules in each parallel container

./gradlew mylibrary:connectedAndroidTest

What happened

Expected behavior

Passing environment variables to `start-emulator-and-run-tests` arguments causes job to fail as of 2.1.1

Orb version 2.1.1

What happened

Orb can no longer accept step arguments that are environment variables.

I have a step that looks like this:

run-andoid-emulator-and-tests:
    steps:
      - android/start-emulator-and-run-tests:
          additional-avd-args: "-d pixel_3a -c 1G"
          additional-emulator-args: "-memory 4096 -cores 3"
          test-command: $GRADLE_TEST_COMMAND
          system-image: $SYSTEM_IMAGE

This works great on 2.1.0. On 2.1.1 however, it fails at "Create avd 'test'":

#!/bin/bash -eo pipefail
#!/bin/bash
echo "no" | avdmanager --verbose create avd -n ${PARAM_AVD_NAME} -k ${PARAM_SYSTEM_IMAGE} ${PARAM_ADDITIONAL_ARGS}

Error: Package path is not valid. Valid system image paths are:ository...       
system-images;android-29;default;x86_64
null

Exited with code exit status 1

CircleCI received exit code 1

(See https://app.circleci.com/pipelines/github/owntracks/android/1025/workflows/7844a0b9-deec-447a-838e-99d67c476e2a/jobs/4071)

If I replace system-image: $SYSTEM_IMAGE with a hard-coded value, the create AVD stage works, but then the "Run tests with max tries of 2" step fails with:

#!/bin/bash -eo pipefail
#!/bin/bash
run_with_retry() {
            MAX_TRIES=${PARAM_MAX_TRIES}
            n=1
            until [ $n -gt $MAX_TRIES ]
            do
              echo "Starting test attempt $n"
              ${PARAM_TEST_COMMAND} && break
              n=$((n+1))
              sleep "${PARAM_RETRY_INTERVAL}"
            done
            if [ $n -gt $MAX_TRIES ]; then
              echo "Max tries reached (${PARAM_MAX_TRIES})"
              exit 1
            fi
        }
        run_with_retry

Starting test attempt 1
environment: line 7: ${GRADLE_TEST_COMMAND}: command not found
Starting test attempt 2
environment: line 7: ${GRADLE_TEST_COMMAND}: command not found
Max tries reached (2)

Exited with code exit status 1

CircleCI received exit code 1

(See https://app.circleci.com/pipelines/github/owntracks/android/1022/workflows/502e1a7a-d62e-43d8-9110-c3dfb6c649ee/jobs/4062)

Expected behavior

Environemnt var values should be passed through to the orb correctly, as they were in 2.1.0

`find` Error when using restore-gradle-cache command from v2.1.1

Orb version

v2.1.1

What happened

I noticed that the latest @ v2.1.1 modified the restore-gradle-cache command, as per #48
Running this on a sample (empty) project. I noted this command is failing with the following error:

find: paths must precede expression: `\('

I found one possible fix would be to eval the find command.

sample job after eval fix: https://app.circleci.com/pipelines/github/kelvintaywl-cci/android-explore/24/workflows/ff85596c-e78f-4ef8-955b-52ae9224a747/jobs/39?invite=true#step-104-5

However, I'm not sure if that's the best approach !

Additional Notes

I also observed that, for the "test-emulator-commands" job triggered from PR #48, it somehow did not pick up the code changes from #48 and this ran fine;
It was running with the restore-gradle-cache command from v2.1.0 instead.
We can see this under the config, when clicking on "Compiled":
https://app.circleci.com/projects/github/CircleCI-Public/android-orb/config/?branchName=&pipelineNumber=329
Screen Shot 2022-06-28 at 15 40 47

Expected behavior

restore-gradle-cache command for v2.1.1. should succeed.

ANDROID_NDK_HOME not correct

Orb version

2.0.3

What happened

The ANDROID_NDK_HOME env variable is not set to the correct path since the SDK manager is used to install the NDK. It should be ${ANDROID_HOME}/ndk/<< parameters.version >> but it's set to /opt/android/<< parameters.version >>

How can attach screenshots of ui test executions with android/start-emulator-and-run-tests command?

circleci/[email protected]

Before adopting this orb in order to attach screenshoot of our ui tests we run the following commands:
image

Now we cannot run "adb pull" while it is still running since "adb "is started and killed inside the command: start-emulator-and-run-tests command

How can we attach screenshot images to the "CI's Artifacts" tab?
It is possible to add a parameter to start-emulator-and-run-tests ? Something like
adb_pull_destination_folder? I

Unable to use ANDROID_NDK_HOME

Orb version

0.1.0

What happened

After running android/install-ndk, ANDROID_NDK_HOME is empty. It seems like it's not correctly exported.

Expected behavior

It should be set to the NDK path.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.