Install_Failed_Cpu_Abi_Incompatible on Device Using Intellij

INSTALL_FAILED_CPU_ABI_INCOMPATIBLE on device using intellij

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. 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 app on genymotion device ,meet:“INSTALL_FAILED_CPU_ABI_INCOMPATIBLE”

The application (certainly a game) must be ARM only.
Genymotion is a x86 platform, so compile the application to target x86.

You may be able to install ARM support manually :
http://forum.xda-developers.com/showthread.php?t=2528952

Failure [INSTALL_FAILED_CPU_ABI_INCOMPATIBLE] Cocos2D-x V3 Android Studio

Android Studio

Cocos2d-x now have full support for Android Studio. This answer is for Android Studio using cocos2d-x version 3.16.

After you create the project you can find the folder called "proj.android-studio" inside this folder you can find the file "gradle.properties"
you will need to change this line of the code.

PROP_APP_ABI=armeabi

for this

PROP_APP_ABI=armeabi-v7a:x86

I'm not sure why the default template is only for support armeabi.
But you can edit the template just locate the folder
"cpp-template-default\proj.android-studio" and edit the graddle-properties so when you create a new project it will be ready for your new projects.

Eclipse Project.

Most of cocos2d-x project I guess they still uses Eclispe so in this case is more easy just change Application.mk

just replace

APP_ABI := armeabi

with

APP_ABI := armeabi armeabi-v7a x86

Why IntelliJ builds Android APK that is incompatible with x86 architecture

I ran into this issue, check out my answer for the referenced question:

INSTALL_FAILED_CPU_ABI_INCOMPATIBLE on device using intellij

INSTALL_FAILED_CPU_ABI_INCOMPATIBLE on Bluestacks

The problem was the apache commons codec library.

I examined the .apk file and found the codec library as a .jar in it.
All other libraries except that one were unpacked.
I assume in the repository, where I got it from via Maven, the .jar is packaged in another .jar.

Using another repository of the library produced a file without the .jar and worked on bluestacks (As mentioned above it already worked on other platforms before).

Google Maps Android API v2 - for ARM only?

Yes. It is an official Google app and does not come in source code form to be recompiled for x86/MIPS.

Use the Genymotion Android emulator, see this other question: How do you install Google frameworks (Play, Accounts, etc.) on a Genymotion virtual device?

Android gradle JAR dependency ends up declared as native

You may be using the incorrect Commons IO library. Try:

http://mvnrepository.com/artifact/commons-io/commons-io/2.4

The version you're using seems to be specific to Apache Directory Studio 2.4 which seems to be a desktop app.



Related Topics



Leave a reply



Submit