INSTALL_FAILED_NO_MATCHING_ABIS when install apk
Master System Design with Codemia
Enhance your system design skills with over 120 practice problems, detailed solutions, and hands-on exercises.
When working with Android app development, you might encounter an installation error known as INSTALL_FAILED_NO_MATCHING_ABIS. This error is a common stumbling block for developers, often appearing when attempting to install an APK either on a physical device or an emulator. In this article, we will delve into what this error means, why it occurs, and how to resolve it.
Understanding ABIs
ABIs (Application Binary Interfaces) in Android define the binary interface between two program modules—one of which is often the operating system—at the level of machine code. Android supports different ABIs, such as ARM, ARM64, x86, and x86_64. Each of these ABIs requires native libraries compiled specifically for them.
Common ABI Variants
- ARM: A common architecture in Android devices, known for good energy efficiency.
- ARM64: The 64-bit version of ARM, allowing more powerful processing and greater memory access.
- x86: Widely used in emulators and some devices, providing good performance.
- x86_64: The 64-bit version of x86, offering enhanced performance and capabilities.
What Does INSTALL_FAILED_NO_MATCHING_ABIS Mean?
The error INSTALL_FAILED_NO_MATCHING_ABIS occurs when you attempt to install an APK that does not include native libraries for the ABI of the target device. Simply put, the APK doesn't contain the native code required to run on the specific architecture of the device.
Technical Explanation
When you build an APK with native code, it's possible to include multiple ABIs by configuring the build settings. If your APK lacks the required native libraries for the device's ABI, Android will throw the INSTALL_FAILED_NO_MATCHING_ABIS error during installation, as it cannot find the necessary components to run the app.
How to Resolve the Error
Include the Required Native Libraries
The primary solution involves ensuring your APK contains the native libraries for the ABIs used by your target devices.
- Identify Target ABIs: Check the ABI of your target device(s) using the command
adb shell getprop ro.product.cpu.abi. - Configure Build Tools: In your
build.gradlefile, configure the NDk settings to include the ABIs necessary for your application. You may add specific ABIs in yourndkconfiguration:
- Rebuild the APK: After configuring the ABIs, rebuild your APK to include the relevant native libraries.
Use APK Splits
You can leverage APK splits to create different APKs for each ABI. This approach reduces APK size and ensures that each target device gets the appropriate APK. Update your build.gradle configuration:
Use ABI Filters in Testing
When testing on an emulator, make sure to configure the emulator to match your APK's ABI. Download or create an emulator image that supports the desired architecture.
Key Points Summary
| Key Aspect | Description |
| What is ABI | Interface between components/programs at machine code level. |
| Common ABIs | ARM, ARM64, x86, x86_64 |
| Error Meaning | APK lacks native libs for device's ABI during installation. |
| Resolution | Configure build settings, add necessary ABI libraries. |
| APK Splits | Separate APKs for each ABI, reducing size and compatibility issues. |
| Use Correct Emulator ABI | Ensure emulator matches the APK's ABI during testing. |
Additional Considerations
Checking APK Contents
Use APK Analyzer or a tool like apktool to check which native libraries your APK contains. This helps in understanding if the build configuration includes all necessary ABIs.
Impact on App Speed and Size
Including multiple ABIs increases the APK size. Choosing the right set of ABIs ensures broader device compatibility, reducing user complaints or installation issues.
Understanding and resolving INSTALL_FAILED_NO_MATCHING_ABIS involves a solid grasp of native libraries and their role in Android development. By configuring build settings effectively and managing ABI splits, developers can prevent this error, facilitating smooth application deployment across various device architectures.

