1

I am unable to install apk files in Android Studio emulator (e.g. Amazon APK). I keep getting following error

The APK failed to install. Error: INSTALL_FAILED_NO_MATCHING_ABIS: Failed to extract native libraries, res=-113

My emulator is running: Android 10.0 x86_64 on Pixel 5

On searching I found that the error occurs mainly due to different architecture (x86 in emulator is expected but apk is arm64).

I tried creating new virtual device with arm64, but I am not even able to start the device even after trying multiple answers from Stacoverflow and keep getting

The emulator process for avd pixel_5_api_29_3 has terminated

Can someone help me find the exact issue?

rock321987
  • 10,942
  • 1
  • 30
  • 43

1 Answers1

0

A lot of app contains library written in c++. C++ code will be compiled to .so files which is different per hardware ABI (application binary interface). Current list of ABIs are:

armeabi
armeabiv-v7a
arm64-v8a
x86
x86-64
mips
mips-64

While 64 bits cpu may run a library compiled to 32 bits, an ARM cpu won't run a library compiled to intel cpu, and intel cpu won't run a library compiled to ARM cpu.

If you write c++ with ndk, it will compile to both arm and x86 and you can run your app on both emulator and real device.

When you publish your app, you can deliberately remove the x86 libraries, which makes it impossible to run on emulators. And therefore the apk won't install on emulator. It will throw error on native library missing for intel.

AIMIN PAN
  • 1,563
  • 1
  • 9
  • 13