I get below errors whenever I try to run a measurement test for my Android project:
Skipping device 'test(AVD)' for 'app:': Unknown API Level > : No compatible devices connected.[TestRunner] FAILED Found 1 connected device(s), 0 of which were compatible. :app:connectedDebugAndroidTest FAILED FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':app:connectedDebugAndroidTest'. > There were failing tests. See the report at: file:
I use a common runner. My target API is 25, and I'm trying to run AVD on API 22.
Here is my gitlab-ci.yml file:
image: openjdk:8-jdk variables: ADB_INSTALL_TIMEOUT: "5" ANDROID_COMPILE_SDK: "25" ANDROID_TEST_SDK: "22" ANDROID_ABI: "armeabi-v7a" ANDROID_BUILD_TOOLS: "25.0.2" ANDROID_SDK_TOOLS: "24.4.1" IS_CI_BUILD : "true" before_script: - apt-get --quiet update --yes - apt-get --quiet install --yes wget tar unzip lib32stdc++6 lib32z1 - wget --quiet --output-document=android-sdk.tgz https://dl.google.com/android/android-sdk_r${ANDROID_SDK_TOOLS}-linux.tgz - tar --extract --gzip --file=android-sdk.tgz - echo y | android-sdk-linux/tools/android --silent update sdk --no-ui --all --filter android-${ANDROID_COMPILE_SDK} - echo y | android-sdk-linux/tools/android --silent update sdk --no-ui --all --filter android-${ANDROID_TEST_SDK} - echo y | android-sdk-linux/tools/android --silent update sdk --no-ui --all --filter platform-tools - echo y | android-sdk-linux/tools/android --silent update sdk --no-ui --all --filter build-tools-${ANDROID_BUILD_TOOLS} - echo y | android-sdk-linux/tools/android --silent update sdk --no-ui --all --filter extra-android-m2repository - echo y | android-sdk-linux/tools/android --silent update sdk --no-ui --all --filter extra-google-google_play_services - echo y | android-sdk-linux/tools/android --silent update sdk --no-ui --all --filter extra-google-m2repository - export ANDROID_HOME=$PWD/android-sdk-linux - export PATH=$PATH:$PWD/android-sdk-linux/platform-tools/ - chmod +x ./gradlew stages: - build
Help me solve this problem. I have been trying to run it for the last 4-5 days with no luck.
Thanks.
android gitlab testing instrumentation gitlab-ci
Keval patel
source share