如何在aosp系统应用程序中添加预构建的共享库

时间:2016-04-26 10:23:29

标签: android android-source android.mk

我的结构是

  packages/apps/myapp //No Java source file
   |
   Android.mk / first Makefile, 
   jni __
        |
        source.c 
        Android.mk // 2nd Makefile
        libs // Prebuilt libs

首先是Amdroid.mk

LOCAL_PATH := $(call my-dir)

include $(call all-makefiles-under,$(LOCAL_PATH))

第二个Android.mk

LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)
LOCAL_MODULE    := libabc
LOCAL_SRC_FILES := $(LOCAL_PATH)/libabc.so
LOCAL_MODULE_TAGS := optional
LOCAL_PRELINK_MODULE := false
include $(PREBUILT_SHARED_LIBRARY)



include $(CLEAR_VARS)


LOCAL_SRC_FILES := \
    my_jni.c



LOCAL_SHARED_LIBRARIES := \
    libabc \


LOCAL_C_INCLUDES := \
    includes


LOCAL_PRELINK_MODULE := false
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE := libmy_jni


include $(BUILD_SHARED_LIBRARY)

但这总是给我错误:

make: *** No rule to make target `out/target/product/myproduct/obj/lib/libabc.so', needed by `out/target/product/myproduct/obj/SHARED_LIBRARIES/libmy_jni_intermediates/LINKED/libmy_jni.so'

任何帮助都将不胜感激。

0 个答案:

没有答案