What is ndk.abiFilters doing under the hood?

Viewed 408

I have some native libraries (.a) that I'm packaging into an Android library (AAR) as .so's, but they only support 32-bit and 64-bit ARM, so in my AAR's build.gradle defaultConfig, I have:

    ndk {

        abiFilters 'armeabi-v7a', 'arm64-v8a'
    }

And sure enough, my native .so's end up in the AAR under <AAR>/jni/<ABI>/blah.so

But when I add my AAR as a dependency for an APK, those .so's do not end up getting packaged into my APK.

UNLESS I also add the above ndk block to the defaultConfig of the APK's build.gradle.

Can anyone explain what is/isn't happening here? I like to distribute my AAR locally within my company, without requiring them to add that ndk block to their APK build.gradle files.

0 Answers
Related