安装APK时INSTALL_FAILED_NO_MATCHING_ABIS

本文翻译自:INSTALL_FAILED_NO_MATCHING_ABIS when install apk

I tried to install my app into Android L Preview Intel Atom Virtual Device, it failed with error: 我试图将我的应用程序安装到Android L Preview Intel Atom Virtual Device中,但失败并出现错误:

INSTALL_FAILED_NO_MATCHING_ABIS INSTALL_FAILED_NO_MATCHING_ABIS

What does it mean? 这是什么意思?


#1楼

参考:https://stackoom.com/question/1f6JQ/安装APK时INSTALL-FAILED-NO-MATCHING-ABIS


#2楼

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. INSTALL_FAILED_NO_MATCHING_ABIS是当您尝试安装具有本机库且没有用于cpu体系结构的本机库的应用程序时。 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. 例如,如果您为armv7编译了一个应用程序,并试图将其安装在使用Intel架构的仿真器上,则它将无法正常工作。


#3楼

如果您使用Genymotion,则需要安装ARM Translation和GApps


#4楼

The comment of @enl8enmentnow should be an answer to fix the problem using genymotion: @ enl8enmentnow的注释应该是使用genymotion解决问题的答案:

If you have this problem on Genymotion even when using the ARM translator it is because you are creating an x86 virtual device like the Google Nexus 10. Pick an ARM virtual device instead, like one of the Custom Tablets. 如果即使在使用ARM转换器时在Genymotion上也遇到此问题,那是因为您正在创建x86虚拟设备(例如Google Nexus 10),而是选择一种ARM虚拟设备,例如自定义平板电脑之一。


#5楼

I'm posting an answer from another thread because it's what worked well for me, the trick is to add support for both architectures : 我正在从另一个线程发布答案,因为这对我来说很有效,诀窍是增加对两种体系结构的支持:

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: 我可以通过将x86加速(HAXM)模拟器添加到模块的build.gradle脚本中android {}块中来使用它:

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. 运行(构建)...现在您的输出文件夹中将有一个(yourapp)-x86-debug.apk。 I'm sure there's a way to automate installing upon Run but I just start my preferred HAXM emulator and use command line: 我确定有一种方法可以在运行时自动安装,但是我只是启动首选的HAXM模拟器并使用命令行:

adb install (yourapp)-x86-debug.apk

#6楼

This is indeed a strange error that can be caused by multidexing your app. 这确实是一个奇怪的错误,它可能是由您的应用程序多义化引起的。 To get around it, use the following block in your app's build.gradle file: 要解决此问题,请在应用程序的build.gradle文件中使用以下代码块:

android {
  splits {
    abi {
        enable true
        reset()
        include 'x86', 'armeabi-v7a'
        universalApk true
    }
  }
  ...[rest of your gradle script]
  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值