[INSTALL_FAILED_NO_MATCHING_ABIS: Failed to extract native libraries, res=-113]

AndroidAndroid Ndk

Android Problem Overview


I have an issue with third party libraries that are imported to my project.

I read quite a lot of articles about that but do not get any information how properly handle it.

I put my classes .so to the folder.

enter image description here

Problem is that the i try to run the app i receive

[INSTALL_FAILED_NO_MATCHING_ABIS: Failed to extract native libraries, res=-113]

Android Solutions


Solution 1 - Android

July 25, 2019 :

I was facing this issue in Android Studio 3.0.1 :

After checking lots of posts, here is Fix which works:

Go to module build.gradle and within Android block add this script:

splits {
    abi {
        enable true
        reset()
        include 'x86', 'x86_64', 'armeabi', 'armeabi-v7a', 'mips', 'mips64', 'arm64-v8a'
        universalApk true
    }
}

Simple Solution. Feel free to comment. Thanks.

Solution 2 - Android

I faced same problem in emulator, but I solved it like this:

Create new emulator with x86_64 system image(ABI)

select device

select x86_64

That's it.

This error indicates the system(Device) not capable for run the application.

I hope this is helpful to someone.

Solution 3 - Android

13 September 2018 It worked for me when add more types and set universalApk with false to reduce apk size

splits {
    abi {
        enable true
        reset()
        include 'x86', 'x86_64', 'armeabi', 'armeabi-v7a', 'mips', 'mips64', 'arm64-v8a'
        universalApk false
    }
}

Solution 4 - Android

If you got this error when working with your flutter project, you can add the following code in the module build.gradle and within Android block and then in the defaultConfig block. This error happened when I was trying to make a flutter apk build.

android{
    ...
    defaultConfig{
        ...
        //Add this ndk block of code to your build.gradle
        ndk {
            abiFilters 'armeabi-v7a', 'x86', 'armeabi'
        }
    }
}

Solution 5 - Android

Doing flutter clean actually worked for me

Solution 6 - Android

Android 9 and Android 11 emulators have support for arm binaries.

https://developer.android.com/studio/releases/emulator#support_for_arm_binaries_on_android_9_and_11_system_images

I had the same issue while using x86 emulator with API level 29, trying to install an apk targeting arm ABI.

I tried x86 emulator with API level 30 and it worked fine.

Solution 7 - Android

My app was running on Nexus 5X API 26 x86 (virtual device on emulator) without any errors and then I included a third party AAR. Then it keeps giving this error. I cleaned, rebuilt, checked/unchecked instant run option, wiped the data in AVD, performed cold boot but problem insists. Then I tried the solution found here. he/she says that add splits & abi blocks for 'x86', 'armeabi-v7a' in to module build.gradle file and hallelujah it is clean and fresh again :)

Edit: On this post Driss Bounouar's solution seems to be same. But my emulator was x86 before adding the new AAR and HAXM emulator was already working.

Solution 8 - Android

After some time i investigate and understand that path were located my libs is right. I just need to add folders for different architectures:

  • ARM EABI v7a System Image

  • Intel x86 Atom System Image

  • MIPS System Image

  • Google APIs

Solution 9 - Android

This is caused by a gradle dependency on some out-of-date thing which causes the error. Remove gradle dependencies until the error stops appearing. For me, it was:

implementation 'org.apache.directory.studio:org.apache.commons.io:2.4'

This line needed to be updated to a newer version such as:

api group: 'commons-io', name: 'commons-io', version: '2.6'

Solution 10 - Android

Anyone facing this while using cmake build, the solution is to make sure you have included the four supported platforms in your app module's android{} block:

 externalNativeBuild {
            cmake {
                cppFlags "-std=c++14"
                abiFilters "arm64-v8a", "x86", "armeabi-v7a", "x86_64"
            }
        }

Solution 11 - Android

Make the splits depend on the same list of abis as the external build. Single source of truth.

android {
// ...
defaultConfig {
// ...
    externalNativeBuild {
        cmake {
            cppFlags "-std=c++17"
            abiFilters 'x86', 'armeabi-v7a', 'x86_64'
        }
    }
} //defaultConfig

splits {
    abi {
        enable true
        reset()
        include defaultConfig.externalNativeBuild.getCmake().getAbiFilters().toListString()
        universalApk true
    }
}
} //android

Solution 12 - Android

As of 21st October 2021, i fixed this by adding these lines to the app level build.gradle

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

Solution 13 - Android

The solution that worked for me (Nov 2021) was adding an exclusion to the packagingOptions within the build.gradle file.

android {
    packagingOptions {
        exclude("lib/**")
    }
}

Specifically the exclude() part must be standalone and in the function even though it may show as deprecated (with a line through it in IntelliJ). That will resolve the issue.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionOleg GordiichukView Question on Stackoverflow
Solution 1 - AndroidShobhakar TiwariView Answer on Stackoverflow
Solution 2 - AndroidDivakar MurugeshView Answer on Stackoverflow
Solution 3 - AndroidMostafa AnterView Answer on Stackoverflow
Solution 4 - AndroidAbel TilahunView Answer on Stackoverflow
Solution 5 - AndroidSteveView Answer on Stackoverflow
Solution 6 - AndroidSfseyhanView Answer on Stackoverflow
Solution 7 - AndroidGultekinView Answer on Stackoverflow
Solution 8 - AndroidOleg GordiichukView Answer on Stackoverflow
Solution 9 - AndroidpeteView Answer on Stackoverflow
Solution 10 - AndroidRatul DoleyView Answer on Stackoverflow
Solution 11 - AndroidppetrakiView Answer on Stackoverflow
Solution 12 - AndroidGlen AgakView Answer on Stackoverflow
Solution 13 - AndroidBrandonView Answer on Stackoverflow