本文介绍了INSTALL_FAILED_CPU_ABI_INCOMPATIBLE使用设备的IntelliJ的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经看到了这个一些问题,但没有一个真正的答案,也没有详细信息。这里是我的情况:

I've seen some questions about this, but none with real answers nor details. Here is my case:

我有一个使用它工作得很好的应用程序的谷歌地图API V2 。最近我发现我不能得到它此内容不是基于ARM的设备。

I have an application that uses Google Maps API v2 which works just fine. Recently I found out that I cannot get it installed on this not ARM-based device.

为了敲定我正在使用随SDK提供谷歌地图样本(\ SDK \演员\谷歌\ google_play_services \样本)

In order to nail down the problem I'm working with Google Maps samples provided with the SDK (\sdk\extras\google\google_play_services\samples)

这使我在安装时同样的错误信息:

which gives me the same error message at install time:

失败[INSTALL_FAILED_CPU_ABI_INCOMPATIBLE]

我得到这个消息只对使用的IntelliJ一个真实设备(12.1.1)

I get this message only on a real device using Intellij (12.1.1)

它工作正常,在真实的设备同时​​使用Eclipse和使用的IntelliJ上配置CPU仿真器:英特尔凌动(86)

It works fine using both Eclipse on real device and using Intellij on the Emulator configured with CPU: Intel Atom (x86)

任何帮助将是非常美联社preciated!

Any help would be highly appreciated!

更新

正如预期的那样,同样的事情发生了Android工作室

As expected, same thing happens with Android Studio

推荐答案

在默认情况下,的IntelliJ假定文件夹中的Andr​​oid模块的根包含本机库,即使它只是持有罐子。因此,打包APK使它看起来像这些都是本机库。我也有类似的问题,即在Genymotion仿真器安装时,我的申请没有原生code和将工作在默认的模拟器,但得到的ABI警告。为了解决这个问题,讲的IntelliJ(或Android工作室),你的库不是本机code:

By default, IntelliJ assumes that the libs folder in the root of an Android module contains native libraries, even if it just holds jars. Thus, it packages the APK making it look like these are native libraries. I just had a similar issue where my application had no native code and would work on the default emulator, but got the ABI warning when installing on the Genymotion emulator. To fix this, tell IntelliJ (or Android Studio) that your libraries are not native code:

  1. 开启文件 - >项目结构
  2. 点击模块在窗口的左侧。
  3. 对于每一个Android的模块,展开下拉列表,选择安卓子项。
  4. 在右侧的结构设置页,删除本机库目录字段的内容(你可以把它空白)。
  5. 一旦你的项目中的每个机器人模块做到了这一点,并应用了更改,您可能需要重建的项目,以使更改通过选择发生构建 - >重建项目从的IntelliJ的全局菜单。
  1. Open File -> Project Structure.
  2. Click Modules on the left side of the window.
  3. For each Android module, expand the dropdown and select the Android subitem.
  4. In the Structure tab on the right, delete contents of the Native libs directory field (you can leave it blank).
  5. Once you've done this for each Android module in the project and applied the changes, you may need to rebuild your project for the changes to take place by choosing Build -> Rebuild Project from IntelliJ's global menu.

这篇关于INSTALL_FAILED_CPU_ABI_INCOMPATIBLE使用设备的IntelliJ的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-12 17:34