1. JNI development requires an external library, which is placed in the Libs/armeabi directory at the end of the package, but Ndk-build updates the Libs/armeabi directory at each compile time, allowing the external library to be deleted. It is cumbersome to copy again every time you use it.
In Ndk-build Docs/prebuilts.html introduced the prebuilt, only a very simple few steps, you can ndk-build the external library
Automatically copy to the libs/armeabi/directory.
The steps are as follows:
A. Create a new directory under the JNI directory prebuilt (name arbitrary)
B. Place the external library libfoo_so.so libbar_so.so libfoo_a.a libbar_a.a in the new prebuilt directory
C. Create the ANDROID.MK in the prebuilt directory, as follows
Local_path: = $ (call My-dir)
Include $ (clear_vars)
Local_module: = Foo_so
Local_src_files: = libfoo-so.so
Include $ (prebuilt_shared_library)
Include $ (clear_vars)
Local_module: = Bar_so
Local_src_files: = libbar_so.so
Include $ (prebuilt_shared_library)
Include $ (clear_vars)
Local_module: = Foo_a
Local_src_files: = libfoo_a.a
Include $ (prebuilt_static_library)
Include $ (clear_vars)
Local_module: = bar_a
Local_src_files: = libbar_a.a
Include $ (prebuilt_static_library)
D. Finally add in the android.mk that need to use the external library
Local_shared_libraries: = Foo_so bar_so
Local_static_libraries: = Foo_a bar_a
Android Development---Ndk-build does not automatically delete external libraries