Understanding and Resolving INSTALL_FAILED_NO_MATCHING_ABIS Error in Android

Nov 08, 2025 · Programming · 42 views · 7.8

Keywords: Android | APK Installation | CPU Architecture | Native Libraries | ABI Compatibility

Abstract: This technical paper provides an in-depth analysis of the INSTALL_FAILED_NO_MATCHING_ABIS error during Android application installation. It explains the root causes related to CPU architecture compatibility issues, presents practical solutions through project configuration modifications, and includes comprehensive code examples to help developers effectively resolve installation failures.

Error Phenomenon and Basic Concepts

During Android application development and deployment, developers frequently encounter the INSTALL_FAILED_NO_MATCHING_ABIS installation error. This error typically occurs when attempting to install an application containing native libraries, where the system cannot find native library files matching the target device's CPU architecture.

From a technical perspective, the Android system supports multiple CPU architectures, including ARM, x86, x86_64, and others. When an application includes native code (typically invoked through JNI), developers need to compile corresponding native libraries for each target architecture. If the application package lacks the native library required for the target device's architecture, the system throws this error.

Architecture Compatibility Principles

ABI (Application Binary Interface) compatibility is a crucial technical consideration for Android applications. Different CPU architectures feature distinct instruction sets and register configurations, making compiled native libraries unable to run directly across architectures.

Taking a common scenario as an example: if developers compile native libraries only for ARM architecture but attempt to install the application on an emulator or device based on Intel x86 architecture, the system will detect the absence of x86 native libraries during APK package parsing, triggering the INSTALL_FAILED_NO_MATCHING_ABIS error.

This architecture mismatch issue is quite prevalent in practical development, especially when testing with emulators. Many developers habitually use ARM-based physical devices for development but encounter installation failures when switching to x86-based emulators.

Solutions and Configuration Methods

The core approach to resolving the INSTALL_FAILED_NO_MATCHING_ABIS error is ensuring the application package includes native libraries for all required CPU architectures of the target device. Below are specific configuration steps:

In Android Studio projects, developers can specify supported CPU architectures by modifying the build.gradle file. Here is a complete configuration example:

android {
    defaultConfig {
        ndk {
            abiFilters 'armeabi-v7a', 'x86', 'arm64-v8a', 'x86_64'
        }
    }
}

This configuration code specifies that the application supports four major CPU architectures: 32-bit ARM, 32-bit x86, 64-bit ARM, and 64-bit x86. With such configuration, the application can install and run normally on the vast majority of Android devices.

For developers using cross-platform development tools like Xamarin, the solution is similar. Multiple architecture support needs to be enabled in project properties:

  1. Open the Xamarin solution file
  2. Right-click the Android project
  3. Select Properties option
  4. Navigate to Android Options settings
  5. Check the required architecture support in the Advanced tab

Practical Case Analysis

Referencing actual user feedback cases provides deeper insight into the prevalence of this issue. Users have reported encountering INSTALL_FAILED_NO_MATCHING_ABIS: Failed to extract native libraries, res=-113 error when attempting to install older games on Samsung S24 Ultra. This suggests the game's native libraries might have been compiled only for older ARM architectures, while newer devices use different CPU architectures.

Another case involves Pixel 7 devices, where users cannot install specific versions of third-party applications, showing the same error message. Notably, the same application installs normally on Pixel 6, further confirming the importance of architecture compatibility.

Technical Implementation Details

From a technical implementation perspective, the Android system performs the following check process during APK installation:

First, the system parses the APK package's manifest file to examine basic application information. Then, it scans the lib directory within the APK, searching for native library files matching the device's CPU architecture. If no matching library files are found, the installation process aborts and returns an error code.

Developers can obtain more detailed error information through ADB commands:

adb install -r yourapp.apk

When installation fails, ADB outputs specific error codes and descriptions, helping developers quickly identify issues.

Best Practice Recommendations

To avoid the INSTALL_FAILED_NO_MATCHING_ABIS error, developers are advised to consider multi-architecture support from the project's inception:

During project planning, clearly define the CPU architecture distribution of target devices. Statistical data shows that modern Android devices primarily use ARM architecture, but Intel-based devices still represent a significant portion in emulators and some tablets.

In build configurations, supporting at least armeabi-v7a and x86 architectures is recommended to ensure optimal device compatibility. For applications with high-performance requirements, consider adding 64-bit architecture support.

Regularly test application installation and operation on devices with different architectures, particularly conducting comprehensive testing on various architecture emulators and physical devices before releasing new versions.

Advanced Technical Considerations

For large projects, supporting multiple CPU architectures may significantly increase APK package size. In such cases, developers can consider using the Android App Bundle (AAB) format, which allows Google Play to dynamically distribute optimized APKs based on users' actual device architectures.

Additionally, developers need to be aware of performance differences between architectures. x86 architecture may have advantages in certain mathematical computation tasks, while ARM architecture typically offers better energy efficiency on mobile devices.

At the code level, developers should ensure consistent behavior of native code across different architectures, avoiding runtime errors or performance issues caused by architectural differences.

Copyright Notice: All rights in this article are reserved by the operators of DevGex. Reasonable sharing and citation are welcome; any reproduction, excerpting, or re-publication without prior permission is prohibited.