Android INSTALL_FAILED_NO_MATCHING_ABIS 如何克服
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/24751350/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
INSTALL_FAILED_NO_MATCHING_ABIS how to overcome
提问by NermaN
When installing my app to Android L preview it fails with error:
将我的应用安装到 Android L 预览时,它失败并显示错误:
INSTALL_FAILED_NO_MATCHING_ABIS.
INSTALL_FAILED_NO_MATCHING_ABIS。
My app uses arm only library, features that uses library is disabled on x86. It works perfectly before Android L, but now i can't even install it. How to disable this error for my app?
我的应用程序仅使用 arm 库,x86 上禁用了使用库的功能。它在 Android L 之前运行良好,但现在我什至无法安装它。如何为我的应用禁用此错误?
回答by Patrick
Posting this because I could not find a direct answer and had to look at a couple of different posts to get what I wanted done...
发布这个是因为我找不到直接的答案,不得不查看几个不同的帖子才能完成我想做的事情......
I was able to use the x86 Accelerated (HAXM) emulator by simply adding this to my Module's build.gradle
script Inside android{}
block:
我可以通过简单地将它添加到我的模块build.gradle
脚本内android{}
块中来使用 x86 加速 (HAXM) 模拟器:
splits {
abi {
enable true
reset()
include 'x86', 'armeabi-v7a'
universalApk true
}
}
Run (build)... Now there will be a (yourapp)-x86-debug.apk
in your output folder. I'm sure there's a way to automate installing upon Run but I just start my preferred HAXM emulator and use command line:
运行(构建)... 现在(yourapp)-x86-debug.apk
您的输出文件夹中将有一个。我确定有一种方法可以在运行时自动安装,但我只是启动我喜欢的 HAXM 模拟器并使用命令行:
adb install (yourapp)-x86-debug.apk
回答by jbxbergdev
I think the thread starter wants build a single APK with an optional native libary, which will only be loaded on ARM devices. This seems impossible at the moment (only using splits/multi apk). I'm facing the same issue and have created a bug report.
我认为线程启动器希望使用可选的本机库构建单个 APK,该库只能在 ARM 设备上加载。目前这似乎是不可能的(仅使用拆分/多 apk)。我面临同样的问题并创建了一个错误报告。
回答by Maron Balinas
In your application.mk
, try to add x86
at
在您的application.mk
,尝试添加x86
在
APP_ABI := armeabi-v7a
APP_ABI := armeabi-v7a
and it should be look like this
它应该是这样的
APP_ABI := armeabi-v7a x86
APP_ABI := armeabi-v7a x86
回答by Kalpa Gunarathna
This problem also come with when working with unity also. The problem is your app uses ARM architecture and the device or emulator that you are trying to install the app support otherwise such as x86. Try installing it on ARM emulator. Hope that solves the problem.
在使用 unity 时也会出现这个问题。问题是您的应用程序使用 ARM 架构,而您尝试安装应用程序的设备或模拟器支持其他方式,例如 x86。尝试在 ARM 模拟器上安装它。希望能解决问题。
回答by Fred
You can find your answer in INSTALL_FAILED_NO_MATCHING_ABIS when install apk
安装 apk 时,您可以在INSTALL_FAILED_NO_MATCHING_ABIS 中找到答案
INSTALL_FAILED_NO_MATCHING_ABIS is when you are trying to install an app that has native libraries and it doesn't have a native library for your cpu architecture. For example if you compiled an app for armv7 and are trying to install it on an emulator that uses the Intel architecture instead it will not work.
INSTALL_FAILED_NO_MATCHING_ABIS 是当您尝试安装具有本机库的应用程序并且它没有适用于您的 CPU 架构的本机库时。例如,如果您为 armv7 编译了一个应用程序,并尝试将其安装在使用 Intel 架构的模拟器上,则它将无法工作。