简体   繁体   中英

JNI based library for Android used without presence of NDK

I am in front of the task of writing an Android library that will be partly implemented in C++ using JNI linking. However, this library will be provided to external developers, and I don't want to hassle them with installation of the NDK framework.

Do anyone have experience developing java libraries that includes JNI linking, that do not require the user environment to include NDK?

Thanks for your help

Even if you are delivering full source code, also provide so files for all architectures supported by NDK. This way they wouldn't need to use NDK to build the very same shared object (so) files over and over again.

You can build for all supported ABIs by adding APP_ABI := all in your Application.mk . All these features are documented in $NDK/docs .

Yes, you can distribute your precompiled native binaries, and "classic" Android developers will be able to use these without installing NDK. They can put the binaries into libs/<ABI> folders (for all ABIs that you and they want to support), and even keep these binaries in their source control system.

They should be aware that Eclipse will not automatically rebuild the APK when they update any of these binaries.

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