Many Android apps ship native code compiled for specific processor architectures (ABIs) such as armeabi‑v7a, arm64‑v8a, x86, or x86_64. When the device tries to load a library that does not match its own ABI, the dynamic linker fails with a message like dlopen failed: library "libfoo.so" not found for "armeabi‑v7a". The result is an immediate "Unfortunately, app has stopped" dialog, often without a clear hint to the user.
This guide shows you how to confirm that an ABI mismatch is the root cause, and then how to fix it—whether you are a developer who can rebuild the app, or an advanced user who needs a compatible APK.
adb is in your system PATH.adb backup or the app’s own export feature).Open the app and trigger the action that crashes it. While the crash occurs, run the following command on your PC:
adb logcat -d | grep -i "dlopen" > crash_log.txt
The -d flag dumps the current buffer and exits, while grep -i "dlopen" filters for library‑loading errors. Open crash_log.txt in a text editor and look for lines similar to:
java.lang.UnsatisfiedLinkError: dlopen failed: library "libexample.so" not found for "armeabi‑v7a"
If you see a line mentioning dlopen failed and an ABI, you have identified an ABI mismatch.
Obtain the APK file. If the app is installed from the Play Store you can pull it with:
adb shell pm path com.example.app
Copy the path that follows package:, then pull the file:
adb pull /data/app/com.example.app-1/base.apk ~/Desktop/example.apk
Now inspect the lib/ folder inside the APK:
unzip -l ~/Desktop/example.apk | grep "lib/"
The output will list directories such as lib/armeabi-v7a/ or lib/arm64-v8a/. Note which ABIs are present.
Run the following commands on the device via ADB:
adb shell getprop ro.product.cpu.abi
adb shell getprop ro.product.cpu.abi2
The first property is the primary ABI (e.g., arm64-v8a), the second is a fallback (e.g., armeabi-v7a). Some devices also expose ro.product.cpu.abilist with a comma‑separated list of all supported ABIs.
Compare this list with the ABIs you discovered in the APK. If the device’s primary ABI is not represented in the APK, the loader will try the fallback; if neither matches, you get the crash.
There are three common ways to resolve the mismatch:
Check the app’s Play Store page or the developer’s website for a “Universal” or “ARM64” download. Verify the file’s integrity (SHA‑256 checksum) before installing.
Install the new APK:
adb install -r ~/Downloads/example-universal.apk
The -r flag replaces the existing installation while keeping its data.
This method assumes you have the source code (open‑source app or your own project). Open the project in Android Studio and locate the build.gradle for the app module.
android {
defaultConfig {
ndk {
// Add the missing ABI, for example armeabi‑v7a
abiFilters "armeabi-v7a", "arm64-v8a"
}
}
}
Sync the project, then build a release APK:
./gradlew assembleRelease
The generated APK will now contain lib/armeabi‑v7a/ (or whichever ABI you added). Transfer it to the device and install with adb install -r as shown above.
If you do not have source code, you can still extract the existing native libraries, add the missing ones, and repack the APK using tools like apktool. This is more advanced and may violate the app’s license, so proceed only with apps you own or that are explicitly open‑source.
Google Play delivers split APKs (one for each ABI). You can fetch the full set with the bundletool utility.
# Install bundletool (requires Java)
wget https://github.com/google/bundletool/releases/download/1.15.0/bundletool-all-1.15.0.jar -O bundletool.jar
# Download the app’s .aab from the Play Store (requires a paid account) or obtain it from the developer.
# Then generate a universal APK:
java -jar bundletool.jar build-apks --bundle=example.aab --output=example.apks --mode=universal
# Extract the universal APK:
unzip example.apks universal.apk -d ./
# Install:
adb install -r universal.apk
This produces an APK that contains every native library, guaranteeing compatibility at the cost of a larger file.
Launch the app and repeat the action that previously crashed it. If the app stays open, run adb logcat again to confirm that no dlopen failed lines appear.
Optionally, you can double‑check the installed APK’s ABIs with:
adb shell pm path com.example.app
adb pull /data/app/com.example.app-1/base.apk ~/Desktop/installed.apk
unzip -l ~/Desktop/installed.apk | grep "lib/"
The list should now include the ABI that matches your device.
arm64-v8a or x86_64) as well.dlopen failed entries for different libraries: The app may depend on a third‑party library that is packaged separately. Repeat Steps 2–4 for the offending library’s package name.armeabi-v7a even though it is a 64‑bit chipset: Some OEMs disable 64‑bit support for legacy reasons. In that case, a 32‑bit ABI is sufficient; just make sure the APK includes it.Installing APKs from unofficial sources can expose you to malware. Always verify checksums and prefer official channels. Keep a backup of your data before replacing an app, especially if you need to uninstall the Play Store version.
If the app is critical (e.g., banking or health) and you cannot obtain a compatible version from the developer, contact their support team. Provide them with the logcat excerpt showing the ABI mismatch; many developers will release an updated APK that includes the missing ABI.
With the steps above you should be able to pinpoint an ABI‑mismatch crash, understand why it happens, and apply the appropriate fix—whether by obtaining the right package, rebuilding the app, or using a universal bundle. The result is a stable app that runs smoothly on your device’s architecture.









