简体   繁体   中英

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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM