1

I am trying to install an apk that contains armeabi-v7a native libraries, on an emulator with KVM enabled. When I try to install the apk on to the running device I am facing this error: Failure [INSTALL_FAILED_NO_MATCHING_ABIS: Failed to extract native libraries, res=-113]

As per https://developer.android.com/studio/releases/emulator#30-0-0 the error above shouldn't occur on Android 9 or 11

Android 11 system images You can now create an AVD that runs Android 11 by selecting either of the available API level 30 system images:

x86: Includes both x86 and ARMv7 ABIs. x86_64: Includes x86, x86_64, ARMv7 and ARM64 ABIs. Support for ARM binaries on Android 9 and 11 system images If you were previously unable to use the Android Emulator because your app depended on ARM binaries, you can now use the Android 9 x86 system image or any Android 11 system image to run your app – it is no longer necessary to download a specific system image to run ARM binaries. These Android 9 and Android 11 system images support ARM by default and provide dramatically improved performance when compared to those with full ARM emulation.

My environment is Ubuntu 18.04 (LTS) Here are some of my setup commands:

tools https://dl.google.com/android/repository/commandlinetools-linux-6200805_latest.zip

sdkmanager --install "system-images;android-28;default;x86" "emulator" "platform-tools" "platforms;android-28" (at this step feel free to replace x86 with x86_64) Note I have tried with google-apis/playstore services and it allows the installation but fails at runtime.

avdmanager create avd -n "x86" -k "system-images;android-28;default;x86" (same steps of replacement apply)

emulator @x86 -no-boot-anim -noaudio -no-window -verbose -wipe-data -partition-size 1024 -qemu -enable-kvm

Is it something I'm missing? editing the build.prop file doesn't help.

| improve this question | | | | |
1

Even though Google states that this works for the Android 9 and 10 images as well from my experience it works only for the Android 11 preview images.

I have tested this on Windows using the latest default x86 Google enabled images shown in the emulator manager for Android 10 and 11. As test app I used an Telegram armv7 only apk file from 2019:

  • Android-R - (Android 11 preview) Google Play Intel x86 Atom System Image (revision: 1)
    • Installation success, app start success
  • Android-29 (Android 10) - Google Play Intel x86 Atom System Image (revision: 8)
    • Installation failed INSTALL_FAILED_NO_MATCHING_ABIS

Therefore my results contradict to the Google description you quoted in your question. At the moment only the preview x86 images of Android R seem to be capable of running armv7 apps.

Test environment: Windows 10 64 bit with Intel Haxm installed.

| improve this answer | | | | |
  • I'll try this, you don't specify a --channel option do you? Also Android-29 is Android 10 as per developer.android.com/studio/releases/platforms#9.0 or is that a typo? I couldn't see support for arm translation for api level 29 in their doc's. I am also assuming you have haxm enabled, just to know that potentially KVM is not causing the problem (I mean it should doc's state that it should be used along side with hardware acceleration) – Anton Toshik Mar 16 at 13:33
  • 1
    @Anton Android-29 is not a typo. I have tested an image for 10 and the preview for 11. I don't use the command-line at all, just the avd manager. Latest Haxm is installed and enabled. But as Haxm is only for x86 the arm emulation should be done by the OS running in the emulator. – Robert Mar 16 at 13:59
  • I am going to mark the answer as correct, but mine still doesn't work, it's because I am running headless emulator and it only supports up to api 27 (androidstudio.googleblog.com/2019/02/emulator-2818-canary.html) – Anton Toshik Mar 17 at 10:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.