How to run your application in Emulator while using native libraries in the app

Updated 24 January 2024

Save

In this blog, I am going to tell you that how to run your app in your emulator while using the native libraries.

When you have used any native libraries in your application and run into your emulator then android studio show an error message:

Installation failed with message Failed to finalize session : INSTALL_FAILED_NO_MATCHING_ABIS: Failed to extract native libraries, res=-113.

It is possible that this issue is resolved by uninstalling an existing version of the apk if it is present, and then re-installing.

 

But this issue is not solved “by uninstalling an existing version of the apk if it is present, and then re-installing“.

Actually, INSTALL_FAILED_NO_MATCHING_ABIS is when you are trying to install an app that has native libraries and it doesn’t have a native library for your cpu architecture.

How to fix it

There is a simple script, which has to written in your build.gradle,

After that clean your project and run your application on the emulator.

What is ABI:

Once the code is compiled, your application accesses the binary data in the library through the ABI. The ABI defines the structures and methods that your compiled application will use to access the external library (just like the API did), only on a lower level.

Source: SO-link

author
. . .

Leave a Comment

Your email address will not be published. Required fields are marked*


4 comments

  • aaron
    • Aman Gupta (Moderator)
  • Rajath
  • Rajneesh Kumar
  • Start a Project


      Message Sent!

      If you have more details or questions, you can reply to the received confirmation email.

      Back to Home