Installing Android ABIs

Hi everyone, I’m currently trying to create a config to run both unit and integration tests. Currently I’m running into issues trying to start an Android 29 emulator. My current travis.yml looks like this:

language: android
sudo: required
jdk: oraclejdk8

android:
  components:
    - tools
    - platform-tools
    - tools
    - extra-android-m2repository

before_install:
  - touch $HOME/.android/repositories.cfg
  - yes | sdkmanager "platforms;android-29"
  - yes | sdkmanager "build-tools;29.0.2"

before_cache:
  - rm -f  $HOME/.gradle/caches/modules-2/modules-2.lock
  - rm -rf $HOME/.gradle/caches/*/plugin-resolution/

cache:
  directories:
  - $HOME/.gradle/caches/
  - $HOME/.gradle/wrapper/
  - $HOME/.android/build-cache

before_script:
  - chmod +x gradlew
  - echo no | android create avd --force -n test -t android-29 --abi armeabi-v7a
  - emulator -avd test -no-skin -no-audio -no-window &
  - android-wait-for-emulator
  - adb shell input keyevent 82 &

script:
  - ./gradlew clean build
  - ./gradlew test
  - ./gradlew connectedcheck

The error I get from this is Error: Invalid --abi armeabi-v7a for the selected target. which is preceded by Valid ABIs: no ABIs. What I take away from this is that there are no ABIs installed. How can I install an ABI to get my build to run? Do I need to install an AVD as well?

1 Like