Tomixxx
Tomixxx

Reputation: 3

Android NDK - Build app with mulltiple NDK build

Is it possible to link multiple native libraries(written in C) in build.gradle like this:

externalNativeBuild {
    ndkBuild {
        path 'src/main/c/Lib1Android.mk'
        path 'src/main/c/Lib2Android.mk'
    }
}

When I use this my JNI file can't see native functions from Lib1 :(

Upvotes: 0

Views: 38

Answers (1)

Mykola Khyliuk
Mykola Khyliuk

Reputation: 1403

According to NdkBuild doc you need to specify only the root ndk-build script but in it you can call any number of other Android.mk files (here is discussed how to do this Android NDK: how to include Android.mk into another Android.mk (hierarchical project structure)?).

Upvotes: 1

Related Questions