Reputation: 474
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
Upvotes: 2
Views: 135
Reputation: 57173
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.
Upvotes: 1
Reputation: 28087
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
.
Upvotes: 1