Android
APK Installation
ABI Error
Mobile Development
Troubleshooting

Fix INSTALL_FAILED_NO_MATCHING_ABIS when installing an APK

Codemia Knowledge Hub ·

INSTALL_FAILED_NO_MATCHING_ABIS means the APK contains native libraries (.so files) compiled for a CPU architecture the target device or emulator does not support. Fix it by including the right ABI in your build configuration, or by using an emulator image that matches the ABIs your APK ships. Only apps with native code (NDK, C/C++ libraries, or third-party SDKs with native components) hit this; pure Java/Kotlin apps never do.

What Android ABIs are

ABI stands for Application Binary Interface. It defines how compiled native code talks to the operating system at the machine code level. CPU architectures have incompatible instruction sets, so each needs its own binaries.

Android supports four primary ABIs:

ABIArchitectureCommon devices
armeabi-v7a32-bit ARMOlder phones and tablets
arm64-v8a64-bit ARMMost modern phones (Pixel, Samsung Galaxy, etc.)
x8632-bit Intel/AMDAndroid emulators (older images)
x86_6464-bit Intel/AMDAndroid emulators (modern images), some Chromebooks

When an APK has native libraries, Android looks for .so files for the device's ABI. If none exist, installation fails with INSTALL_FAILED_NO_MATCHING_ABIS.

Why the ABIs do not match

The usual case is an ARM-only APK on an x86 emulator (or the reverse):

  1. Your app depends on a native library (e.g., SQLCipher, OpenCV, FFmpeg, or a Firebase SDK with native components).
  2. Your build configuration only includes ARM ABIs.
  3. You install the APK on an x86_64 emulator.
  4. The emulator finds no x86_64 .so files in the APK.
  5. Installation fails with INSTALL_FAILED_NO_MATCHING_ABIS.

Check the device's ABI:

bash
adb shell getprop ro.product.cpu.abi

Output example:

text
x86_64

Check which ABIs the APK contains:

bash
1# Using aapt (from Android SDK build-tools)
2aapt dump badging app-debug.apk | grep native-code
3
4# Or unzip and check directory structure
5unzip -l app-debug.apk | grep "lib/"

An APK with all ABIs shows:

text
1lib/armeabi-v7a/libnative.so
2lib/arm64-v8a/libnative.so
3lib/x86/libnative.so
4lib/x86_64/libnative.so

If you see only lib/arm64-v8a/ and the emulator is x86_64, that is the failure.

Fix 1: include the required ABIs in build.gradle

Build native libraries for every target ABI:

groovy
1android {
2    defaultConfig {
3        ndk {
4            abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
5        }
6    }
7}

Then rebuild:

bash
./gradlew assembleDebug

The APK now has .so files for all four architectures, at the cost of a larger APK with four copies of each native library.

Targeting specific ABIs

If you deploy only to certain devices, narrow the filter:

groovy
1android {
2    defaultConfig {
3        ndk {
4            // Only ARM devices (most physical phones)
5            abiFilters 'armeabi-v7a', 'arm64-v8a'
6        }
7    }
8}

This APK is smaller but fails on x86 emulators. Use it when you ship only to physical devices and test on ARM emulator images.

Fix 2: use an emulator image that matches the APK

Instead of changing the build, create an emulator for the ABIs the APK already has. In Android Studio:

  1. Open Tools > Device Manager.
  2. Click Create Virtual Device.
  3. Select a device definition (e.g., Pixel 7).
  4. On the system image screen, choose an image matching your APK's ABI.

On Apple Silicon Macs (M1/M2/M3), pick an arm64-v8a image for ARM APKs. It runs natively and avoids the mismatch. On Intel/AMD machines, pick an x86_64 image and make sure the APK includes x86_64 libraries.

bash
1# List available emulator images
2sdkmanager --list | grep "system-images"
3
4# Install a specific ARM64 image
5sdkmanager "system-images;android-34;google_apis;arm64-v8a"

Fix 3: APK splits for per-ABI APKs

Splits produce one small APK per architecture:

groovy
1android {
2    splits {
3        abi {
4            enable true
5            reset()
6            include 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
7            universalApk true  // also create a fat APK as fallback
8        }
9    }
10}

This generates:

text
1app-armeabi-v7a-debug.apk    (smallest, ARM 32-bit only)
2app-arm64-v8a-debug.apk      (ARM 64-bit only)
3app-x86-debug.apk            (Intel 32-bit only)
4app-x86_64-debug.apk         (Intel 64-bit only)
5app-universal-debug.apk      (all ABIs, largest)

Install the split that matches the target:

bash
1# For an x86_64 emulator
2adb install app-x86_64-debug.apk
3
4# For a physical ARM64 device
5adb install app-arm64-v8a-debug.apk

For Google Play, use Android App Bundles (AAB) instead of splits; the Play Store handles per-device delivery.

Fix 4: Android App Bundle (AAB) for distribution

With App Bundles, Google Play generates optimized APKs per device configuration, ABI included:

groovy
1android {
2    defaultConfig {
3        ndk {
4            abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
5        }
6    }
7}
bash
./gradlew bundleRelease

Upload the .aab to Google Play Console. Each user downloads only the native libraries their device needs.

To test a bundle locally, use bundletool:

bash
1# Generate APKs from the bundle
2bundletool build-apks --bundle=app-release.aab --output=app.apks
3
4# Install on a connected device
5bundletool install-apks --apks=app.apks

Apple Silicon Macs and ARM emulators

On M1/M2/M3 Macs, the emulator runs ARM system images natively because the host is ARM. So:

  • ARM APKs install and run fine.
  • x86 APKs fail with INSTALL_FAILED_NO_MATCHING_ABIS, because the emulator does not translate x86 instructions.

If you hit the error on Apple Silicon:

  1. Verify the emulator uses an arm64-v8a system image.
  2. Make sure your ABI filters include arm64-v8a.
  3. Confirm third-party SDKs ship ARM64 native libraries.

Diagnosis checklist

bash
1# Step 1: Check the device/emulator ABI
2adb shell getprop ro.product.cpu.abi
3adb shell getprop ro.product.cpu.abilist
4
5# Step 2: Check what ABIs the APK contains
6unzip -l app-debug.apk | grep "\.so$"
7
8# Step 3: Compare - is there overlap?
9# If not, either add the missing ABI to your build or change the emulator image

ro.product.cpu.abilist lists every ABI the device supports, including compatibility layers. An ARM64 device typically supports both arm64-v8a and armeabi-v7a.

Mistakes that cause or hide the mismatch

Building only for ARM and testing on an x86 emulator. The most frequent cause. Add x86/x86_64 to abiFilters or switch to an ARM image.

Assuming the APK is corrupt. It is fine. The native libraries simply do not match the device's CPU.

Shipping all ABIs in release builds without splits or bundles. Four copies of native libraries inflate the download. Use splits or App Bundles in production.

Forgetting third-party native libraries. Even if your code is pure Kotlin, dependencies like react-native, flutter or realm may ship .so files for only some ABIs.

Using x86 images on Apple Silicon. The ARM host cannot run them efficiently. Use arm64-v8a images, the reverse of the traditional problem.

Ignoring ro.product.cpu.abilist. An ARM64 device can usually run ARMv7 code, so armeabi-v7a libraries may work without a dedicated arm64-v8a build.


Free course
Beginner
7 lessons
2 hours
Tackling System Design Interview Problems

A short course that equips you with the skills to approach system design interviews methodically.

Start the free course
Basis Lab
No course covers this one yet

Basis Lab writes one for you from a sentence about what you want to be able to do, then teaches it and checks you understood. Your first course is free.

Build my course
Data Structures & Algorithms practice on Codemia

Step through 300+ coding interview problems with animated visualisers that show the data structure changing as the code runs. The Blind 75 are free.

Practice algorithms