【问题标题】:INSTALL_FAILED_NO_MATCHING_ABIS when instrumented testing仪器测试时的 INSTALL_FAILED_NO_MATCHING_ABIS
【发布时间】:2017-12-17 13:21:53
【问题描述】:

我在 Android Studio 中的插桩测试遇到问题。当我想使用命令gradlew connectedAndroidTest 在模拟器(Nexus 5 API 24、x86)上运行检测测试时,它会因INSTALL_FAILED_NO_MATCHING_ABIS: Failed to extract native libraries, res=-113 错误而失败。但我可以在模拟器上正常安装应用程序,没问题。它仅在测试期间失败。并且测试在物理设备(三星 Galaxy S8 或华为 GRA-L09)上完美运行。 正如我在另一个线程中看到的,我在我的 gradle 文件中添加了这个,但它没有解决问题:

splits {
    abi {
        enable true
        reset()
        include 'x86', 'x86_64', 'armeabi-v7a'
        universalApk true
    }
}

我还尝试使用另一个 CPU/API(x86_64 或 armeabi-v7a)运行新的模拟设备,但没有帮助。

我正在运行带有 gradle 版本 4.1 的 Android Studio 3.0.1

有什么想法吗?

【问题讨论】:

  • 你找到解决这个问题的办法了吗?
  • 不:(我不得不放弃

标签: android android-studio android-emulator abi android-install-apk


【解决方案1】:

遇到了同样的问题,对我来说这与以下依赖有关:

androidTestImplementation 'org.apache.directory.studio:org.apache.commons.io:2.4'

通过替换它来解决:

androidTestImplementation 'commons-io:commons-io:2.4'

更多信息在这里:commons-io-2.4.jar is showing as Native Platform with 0 supported device

【讨论】:

    【解决方案2】:

    有同样的问题,我与 mockito 有版本依赖冲突,更新它并解决了。我最好的建议是查看您的 androidTestImplementations 并查找与其他依赖项的冲突。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2022-11-11
      • 2014-05-22
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-10-23
      • 2013-09-21
      相关资源
      最近更新 更多