Android 安装时报错INSTALL_FAILED_NO_MATCHING_ABIS

在安装App到手机上是提示安装错误:INSTALL_FAILED_NO_MATCHING_ABIS

错误原因:是由于使用了native libraries 。该native libraries 不支持当前的cpu的体系结构。

常见的cpu架构

通过adb shell 查看CPU架构:

 查看设备系统架构:

C:\Users\Desktop> adb shell
tb_bsp:/ $ getprop ro.product.cpu.abi
armeabi-v7a

armeabi-v7a 类型

查看CPU 详情:

tb_bsp:/ $ cat /proc/cpuinfo
processor       : 0
Processor       : ARMv7 Processor rev 4 (v7l)
model name      : ARMv7 Processor rev 4 (v7l)
BogoMIPS        : 18.17
Features        : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm aes pmull sha1 sha2 crc32
CPU implementer : 0x41
CPU architecture: 7
CPU variant     : 0x0
CPU part        : 0xd03
CPU revision    : 4

processor       : 1
Processor       : ARMv7 Processor rev 4 (v7l)
model name      : ARMv7 Processor rev 4 (v7l)
BogoMIPS        : 18.17
Features        : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm aes pmull sha1 sha2 crc32
CPU implementer : 0x41
CPU architecture: 7
CPU variant     : 0x0
CPU part        : 0xd03
CPU revision    : 4

processor       : 2
Processor       : ARMv7 Processor rev 4 (v7l)
model name      : ARMv7 Processor rev 4 (v7l)
BogoMIPS        : 18.17
Features        : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm aes pmull sha1 sha2 crc32
CPU implementer : 0x41
CPU architecture: 7
CPU variant     : 0x0
CPU part        : 0xd03
CPU revision    : 4

processor       : 3
Processor       : ARMv7 Processor rev 4 (v7l)
model name      : ARMv7 Processor rev 4 (v7l)
BogoMIPS        : 18.17
Features        : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm aes pmull sha1 sha2 crc32
CPU implementer : 0x41
CPU architecture: 7
CPU variant     : 0x0
CPU part        : 0xd03
CPU revision    : 4

Hardware        : MT8766A
Revision        : 0000
Serial          : 0000000000000000

解决方法

如果当前app是我们自己开发的,可通过一下方法尝试解决:

解决方法:在build.gradle(app)中添加相应的类型库,同步即可

 添加后,就能够安装运行了。如果没有使用第三方的架包的话,只需要在build.gradle(app)中的defaultConfig下增加以下编译配置:

splits {
    abi {
        enable true
        reset()
        //缺少什么CPU类型就添加对应的类型即可
        include 'armeabi','x86', 'armeabi-v7a','x86_64','arm64-v8a', 'mips', 'mips64'
        universalApk true
    }
}
 

但是如果属于三方应用,暂时我还没什么好的解决方法,

猜你喜欢

转载自blog.csdn.net/gqg_guan/article/details/128562143