Android INSTALL_FAILED_CPU_ABI_INCOMPATIBLE 在目标上安装应用程序时收到此错误消息如何解决?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/2047333/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-20 04:21:02  来源:igfitidea点击:

INSTALL_FAILED_CPU_ABI_INCOMPATIBLE while installing apps on target getting this error message how to resolve?

android

提问by Atul Raut

want to know is there any architecture wise problem or else ?

想知道是否有任何架构方面的问题?

回答by Samuh

An ABI(Application Binary Interface) specifies details that are specific to the machine architecture. From Wikipedia:

ABI(应用程序二进制接口)指定特定于机器架构的细节。来自维基百科:

ABIs cover details such as data type, size, and alignment; the calling convention, which controls how functions' arguments are passed and return values retrieved; the system call numbers and how an application should make system calls to the operating system; and in the case of a complete operating system ABI, the binary format of object files, program libraries and so on.

ABI 涵盖数据类型、大小和对齐等细节;调用约定,它控制如何传递函数的参数和检索返回值;系统调用号以及应用程序应如何对操作系统进行系统调用;在完整的操作系统 ABI 的情况下,目标文件、程序库等的二进制格式。

Found this in the "PackageManager.java" file:

在“PackageManager.java”文件中找到了这个:

public static final int INSTALL_FAILED_CPU_ABI_INCOMPATIBLE = -16;

Installation return code: this is passed to the IPackageInstallObserverby installPackage(android.net.Uri, IPackageInstallObserver, int)if the package being installed contains native code, but none that is compatible with the the device's CPU_ABI.

public static final int INSTALL_FAILED_CPU_ABI_INCOMPATIBLE = -16;

安装返回码:如果安装的包包含本机代码,但不与设备的 CPU_ABI 兼容,则将其传递给 IPackageInstallObserverby installPackage(android.net.Uri, IPackageInstallObserver, int)

Your apk must contain some binary code compiled(using NDK?) for a different machine/emulator while it is being installed on some other machine(emulator).

您的 apk 必须包含一些为其他机器/模拟器编译(使用 NDK?)的二进制代码,同时它被安装在其他机器(模拟器)上。

回答by Vikram.exe

I saw the reference to this thread in BlueStacks support forum. If you are referring to BlueStacks, you will get this error when you try to install an app which has native ARM code and needs binary translation to work on X86 architecture.

我在 BlueStacks 支持论坛中看到了对这个线程的引用。如果您指的是 BlueStacks,当您尝试安装具有本机 ARM 代码且需要二进制转换才能在 X86 架构上运行的应用程序时,您将收到此错误。

This is currently not supported with the alpha release. Please check this link for more details: http://community.bluestacks.com/bluestacks/topics/some_apps_like_angry_birds_fruit_ninja_are_marked_unavailable_on_channels_website_why_is_this_so

Alpha 版本目前不支持此功能。请查看此链接了解更多详情:http: //community.bluestacks.com/bluestacks/topics/some_apps_like_angry_birds_fruit_ninja_are_marked_unavailable_on_channels_website_why_is_this_so

[EDIT]: If you any questions related to BlueStacks, please post them on BlueStacks community, you might also find answers to some common issues(like this one).

[编辑]:如果您有任何与 BlueStacks 相关的问题,请将它们发布到 BlueStacks 社区,您可能还会找到一些常见问题的答案(例如这个)。

回答by Amit

i changed avd to target sdk version and it worked fine

我将 avd 更改为目标 sdk 版本并且运行良好