INSTALL_FAILED_NO_MATCHING_ABIS when install apk
Interview Questions practice on Codemia
Over 8,000 real interview questions from top companies, searchable by company and role.
INSTALL_FAILED_NO_MATCHING_ABIS means the APK contains native libraries (.so files) that were compiled for a CPU architecture the target device or emulator does not support. The fix is to either include the correct ABI in your build configuration or create an emulator image that matches the ABIs your APK ships. This error only affects apps that use native code (NDK, C/C++ libraries, or third-party SDKs with native components). Pure Java/Kotlin apps without native libraries will never trigger it.
What Are ABIs in Android?
ABI stands for Application Binary Interface. It defines how compiled native code interacts with the operating system at the machine code level. Different CPU architectures require different compiled binaries because their instruction sets are incompatible.
Android supports four primary ABIs:
| ABI | Architecture | Common devices |
armeabi-v7a | 32-bit ARM | Older phones and tablets |
arm64-v8a | 64-bit ARM | Most modern phones (Pixel, Samsung Galaxy, etc.) |
x86 | 32-bit Intel/AMD | Android emulators (older images) |
x86_64 | 64-bit Intel/AMD | Android emulators (modern images), some Chromebooks |
When an APK contains native libraries, Android checks whether the APK includes .so files for the device's ABI. If no matching library exists, installation fails with INSTALL_FAILED_NO_MATCHING_ABIS.
Why This Error Happens
The most common scenario is running an APK built only for ARM on an x86 emulator (or vice versa). Here is the typical sequence:
- Your app depends on a native library (e.g., SQLCipher, OpenCV, FFmpeg, or a Firebase SDK with native components).
- Your build configuration only includes ARM ABIs.
- You try to install the APK on an x86_64 emulator.
- The emulator cannot find x86_64
.sofiles in the APK. - Installation fails with
INSTALL_FAILED_NO_MATCHING_ABIS.
You can verify your device's ABI with:
Output example:
And inspect which ABIs your APK contains:
Expected output for an APK with multiple ABIs:
If the output shows only lib/arm64-v8a/ but your emulator is x86_64, that explains the failure.
Fix 1: Include All Required ABIs in build.gradle
The most straightforward fix is configuring your build to include native libraries for every target ABI:
After adding this, rebuild the APK:
This ensures the APK contains .so files for all four major architectures. The trade-off is a larger APK size since it bundles four copies of every native library.
Targeting specific ABIs
If you only deploy to specific device types, you can narrow the filter:
This produces a smaller APK but will fail on x86 emulators. Use this when you ship to physical devices only and test on ARM emulator images.
Fix 2: Use an Emulator Image That Matches Your APK
Instead of changing the build, you can create an emulator that supports the ABIs your APK already contains.
In Android Studio:
- Open Tools > Device Manager.
- Click Create Virtual Device.
- Select a device definition (e.g., Pixel 7).
- On the system image screen, choose an image that matches your APK's ABI.
For ARM APKs on Apple Silicon Macs (M1/M2/M3), select an arm64-v8a system image. These run natively without translation and avoid the ABI mismatch entirely.
For Intel/AMD machines, select an x86_64 image and make sure your APK includes x86_64 libraries.
Fix 3: Use APK Splits to Generate Per-ABI APKs
APK splits produce separate APKs for each architecture, keeping each one small while covering all target devices:
This generates files like:
Install the correct split for your target:
For Google Play distribution, use Android App Bundles (AAB) instead of APK splits. Play Store handles per-device delivery automatically.
Fix 4: Use Android App Bundle (AAB) for Distribution
App Bundles let Google Play generate optimized APKs for each device configuration, including ABI:
Upload the .aab file to Google Play Console. The Play Store generates and serves device-specific APKs, so each user downloads only the native libraries their device needs.
For local testing of App Bundles, use bundletool:
Special Case: Apple Silicon Macs and ARM Emulators
On M1/M2/M3 Macs, the Android emulator runs ARM system images natively because the host CPU is ARM-based. This means:
- ARM APKs install and run without issues.
- x86 APKs fail with
INSTALL_FAILED_NO_MATCHING_ABISbecause the emulator does not translate x86 instructions.
If you encounter this error on Apple Silicon:
- Verify your emulator uses an
arm64-v8asystem image. - Ensure your APK includes
arm64-v8ain its ABI filters. - If using third-party SDKs, confirm they ship ARM64 native libraries.
Diagnosing the Error Systematically
When you encounter INSTALL_FAILED_NO_MATCHING_ABIS, follow this checklist:
The ro.product.cpu.abilist property shows all ABIs the device supports, including compatibility layers. An ARM64 device typically supports both arm64-v8a and armeabi-v7a.
Common Pitfalls
Building only for ARM and testing on an x86 emulator. This is the most frequent cause. Either add x86/x86_64 to your abiFilters or switch to an ARM emulator image.
Assuming the error means a corrupt APK. The APK is fine. The problem is a mismatch between the native libraries it contains and the device's CPU architecture.
Including all ABIs in release builds without splits or bundles. Bundling four copies of native libraries inflates APK size significantly. Use APK splits or App Bundles for production to keep download sizes small.
Forgetting that third-party SDKs bring their own native libraries. Even if your own code is pure Kotlin, a dependency like react-native, flutter, or realm may include .so files for only certain ABIs.
Using x86 emulator images on Apple Silicon Macs. The ARM-based host cannot run x86 emulator images efficiently. Use arm64-v8a images instead. This is the reverse of the traditional problem.
Not checking ro.product.cpu.abilist for compatibility. A device might support multiple ABIs through compatibility layers. An ARM64 device can usually run ARMv7 code, so armeabi-v7a libraries may work even without a dedicated arm64-v8a build.
Summary
INSTALL_FAILED_NO_MATCHING_ABISmeans the APK's native libraries do not match the target device's CPU architecture.- Add the required ABIs to
ndk.abiFiltersinbuild.gradleand rebuild. - Alternatively, create an emulator image that matches your APK's existing ABIs.
- Use APK splits or Android App Bundles to distribute architecture-specific APKs without inflating download size.
- On Apple Silicon Macs, use
arm64-v8aemulator images and ensure your APK includes ARM64 native libraries. - Always verify both the device ABI (
adb shell getprop ro.product.cpu.abi) and the APK contents (unzip -loraapt dump) when diagnosing this error.
Related reading
- INSTALL_FAILED_UPDATE_INCOMPATIBLE when I try to install compiled .apk on device
- INSTALL_FAILED_USER_RESTRICTED android studio using redmi 4 device
- Install .ipa to iPad with or without iTunes
- Install shows error in console INSTALL FAILED CONFLICTING PROVIDER
- Installation failed with message Error android.os.ParcelableException java.io.IOException Requested internal only, but not enough space
- Installation Issue with matplotlib Python
- Installing ADB on macOS
- Instantiate and Present a viewController in Swift
.png&w=3840&q=75)
Tackling System Design Interview Problems
A short course that equips you with the skills to approach system design interviews methodically.
Start the free courseTrack what you have practised
A free account saves your progress, solutions and study plan across every problem on Codemia.
Interview Questions practice on Codemia
Over 8,000 real interview questions from top companies, searchable by company and role.