How to include * .so version file in apk using Gradle?

I am trying to create an Android application with some precompiled native libraries: liba.so and libb.so.1.2.3

Libraries are placed in the jniLibs subdirectory. After creating the APK file, only liba.so is included in it , but not libb.so.1.2.3 .

The result is predictable. Application crash on startup.

What to do with build scripts to include all files from jniLibs in the APK?

+4
source share
1 answer

, Android, , Gradle, . Android DSL docs, jniLibs:

android {
    sourceSets {
        main {
            jniLibs.filter.include("**/*")
        }
    }
}

, !

0

Source: https://habr.com/ru/post/1672370/


All Articles