0

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 :(

Tomixxx
  • 3
  • 1

1 Answers1

1

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)?).

Mykola Khyliuk
  • 1,234
  • 1
  • 9
  • 16