All Products
Search
Document Center

Mobile Testing - Deprecated:INSTALL_FAILED_NO_MATCHING_ABIS

Last Updated:Feb 28, 2022

Problem description

This exception occurs if the installed app contains native libraries (usually .so files) but the library files of the corresponding CPU architecture do not exist in the device. For example, a developer compiles an ARMv7-based app, but the app is to be installed on an Intel-based device.

Solution

This exception occurs if the installed app contains native libraries (usually .so files) but the library files of corresponding CPU architectures do not exist in the device. We recommend that you use NDK to compile the library files of the corresponding CPU architecture when compiling the app.

1. Write the Application.mk file. Create the Application.mk file in the jni directory (at the same level as the hello-jni.c directory) and add the following code to the file:

APP_ABI := armeabi armeabi-v7a x86

The code means that you can generate .so files for three processors at a time. If the Application.mk file does not exist or is not to be used, add the following code to the ndk-build parameter:

APP_ABI="armeabi armeabi-v7a x86 mips"

The following code is executed:

ndk-build APP_ABI="armeabi armeabi-v7a x86 mips"

2. Generate .so files. After you write the Android.mk file, you can use the ndk-build script in the Android NDK package to generate .so files by using the following method:

mqc@ubuntu:~/workspace/android/NDK/hello-jni$ ls 
AndroidManifest.xml  assets  bin  default.properties  gen  jni  libs  obj  res  src 
mqc@ubuntu:~/workspace/android/NDK/hello-jni$ ndk-build 
Gdbserver      : [arm-linux-androideabi-4.4.3] libs/armeabi/gdbserverGdbsetup       : libs/armeabi/gdb.setupInstall        : libhello-jni.so => libs/armeabi/libhello-jni.so 

Then, three armeabi/armeabi-v7a/x86 folders are generated in the hello-jni/libs directory and the libhello-jni.so files are generated in these folders.

3. Recompile the HelloJni project in Eclipse to generate an APK file. Recompile the HelloJni project in Eclipse to generate an APK file. The libhello-jni.so files are contained in the APK file.