简体   繁体   English

Android Travis CI错误:所选目标的--abi armeabi-v7a无效

[英]Android Travis CI Error: Invalid --abi armeabi-v7a for the selected target

My Travis build keeps failing because apparently it does not recognize the arm abi. 我的Travis构建不断失败,因为它显然无法识别arm abi。 Here's my full .travis.yml : 这是我完整的.travis.yml

language: android
sudo: required

env:
  global:
  - ANDROID_API_LEVEL=28
  - ANDROID_BUILD_TOOLS_VERSION=28.0.3
  - ANDROID_ABI=armeabi-v7a
  - ANDROID_EMU_API_LEVEL=27

android:
  components:
    - tools
    - platform-tools
    - tools # appears twice as per Travis docs
    - build-tools-$ANDROID_BUILD_TOOLS_VERSION
    - android-$ANDROID_API_LEVEL
    - android-$ANDROID_EMU_API_LEVEL
    - extra-android-m2repository
    - sys-img-${ANDROID_ABI}-android-${ANDROID_EMU_API_LEVEL}
  licenses:
    - 'android-sdk-preview-license-52d11cd2'
    - 'android-sdk-license-.+'
    - 'google-gdk-license-.+'

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

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

before_script:
  - echo no | android create avd --force -n test -t android-$ANDROID_EMU_API_LEVEL --abi $ANDROID_ABI -c 100M
  - emulator -avd test -no-audio -no-window &
  - android-wait-for-emulator
  - adb shell input keyevent 82 &
  - chmod +x gradlew

script:
  - android list target
  - ./gradlew clean build
  - ./gradlew test
  - ./gradlew connectedCheck

I have also tried to change the abi in the emulator to google_apis/armeabi-v7a to no avail. 我也尝试将模拟器中的abi更改为google_apis/armeabi-v7a无效。 Also tried to add google_apis in the system image download. 还尝试在系统映像下载中添加google_apis I have currently tried API_LEVEL 22, 27 and 28. What is the issue here? 我目前已经尝试了API_LEVEL 22、27和28。这里是什么问题?

您可以尝试使用ANDROID_ABI=arm64-v8a代替ANDROID_ABI=armeabi-v7a

I don't know if this is still relevant since it was asked 4 months ago, but I also just recently had this same issue. 我不知道这是否仍然有意义,因为它是4个月前提出的,但我最近也遇到了同样的问题。 I tried many different things people suggested and none of it worked till I set it up this way: 我尝试了人们建议的许多不同方法,但直到我以这种方式进行设置,这些方法都无济于事:

language: android
sudo: required
jdk: oraclejdk8

env:
  global:
  - ANDROID_API_LEVEL=28
  - ANDROID_BUILD_TOOLS_VERSION=28.0.3
  - ANDROID_ABI=armeabi-v7a

android:
  components:
    - tools
    - platform-tools
    - tools
    - extra-android-m2repository
  licenses:
    - 'android-sdk-preview-license-52d11cd2'
    - 'android-sdk-license-.+'
    - 'google-gdk-license-.+'

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

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

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

before_script:
  - chmod +x gradlew

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Google API 的“所选目标的 --abi armeabi-v7a 无效” - “Invalid --abi armeabi-v7a for the selected target” with Google APIs 强制 CPU/ABI 在 Android 上使用 armeabi-v7a - Forcing CPU/ABI to armeabi-v7a on Android 人行横道项目错误'建筑ABI'armeabi-v7a'失败' - crosswalk-project error ' Building ABI 'armeabi-v7a' failed' Android Travis CI 无效 abi - Android Travis CI invalid abi armeabi-v7a与-mfloat-abi =很难 - armeabi-v7a with -mfloat-abi=hard 如何确定 Android .so 文件的 ABI(即 armeabi 或 armeabi-v7a)? - How to determine ABI of Android .so file (i.e. armeabi or armeabi-v7a)? 警告:由 'android.injected.build.abi' 设置的 ABIs [armeabi-v7a,armeabi] gradle 标志包含此项目未针对的 'ARMEABI' - WARNING: ABIs [armeabi-v7a,armeabi] set by 'android.injected.build.abi' gradle flag contained 'ARMEABI' not targeted by this project CMake Android Ubuntu 上的 NDK 错误 armeabi-v7a - CMake Android NDK error armeabi-v7a on Ubuntu Android:在aarch64平台上找不到armeabi-v7a abi过滤器的libopencv_java3.so - Android : libopencv_java3.so not found for armeabi-v7a abi filter on aarch64 platform M1 MacBook Pro 上的 Android Studio 无法使用 ABI armeabi-v7a 模拟系统映像 - Android Studio on M1 MacBook Pro Cannot Simulate System Images with ABI armeabi-v7a
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM