There is a much simpler way to do all of this.
Let's say that your prebuilt library is called "libprebuilt.so"
In the project folder of the new project you want to only include the prebuilt library, do something like:
mkdir -p jni/libprebuilt
cp libprebuilt.so jni/libprebuilt
Then, just create a jni/libprebuilt/Android.mk file:
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := libprebuilt
LOCAL_SRC_FILES := libprebuilt.so
include $(PREBUILT_SHARED_LIBRARY)
Then when you do ndk-build, it will copy this library in to libs/armeabi/ ... that's all!
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…