Android.mk中引用第3方动态库

Android.mk 文件内容:

 

LOCAL_PATH:= $(call my-dir)

include $(CLEAR_VARS)

LOCAL_MODULE_TAGS := optional

LOCAL_SRC_FILES:= \
  testH264VideoStreamer.cpp


LOCAL_MODULE := live555_stream
LOCAL_MODULE_CLASS := EXECUTABLES
LOCAL_STATIC_LIBRARIES := libcutils libc

 

 

LOCAL_C_INCLUDES += $(LOCAL_PATH)/liveMedia/include \
             $(LOCAL_PATH)/groupsock/include \
             $(LOCAL_PATH)/UsageEnvironment/include \
             $(LOCAL_PATH)/BasicUsageEnvironment/include


LOCAL_SHARED_LIBRARIES := \
            libcutils libutils


#LOCAL_SHARED_LIBRARIES := liblive555
LOCAL_LDFLAGS += $(LOCAL_PATH)/liblive555.so

#LOCAL_STATIC_LIBRARIES += libstlport_static libstdc++ libm libc

include $(BUILD_EXECUTABLE)

 

注意: 引用第三方动态库*.so, 不能用LOCAL_SHARED_LIBRARIES := liblive555这种方式,否则会报错:

         make: *** No rule to make target `out/target/product/rk312x/obj/SHARED_LIBRARIES/liblive555_intermediates/export_includes', needed by `out/target/product/rk312x/obj/EXECUTABLES/live555_stream_intermediates/import_includes'.  Stop.

        只有系统的库,才能这样引用。切记! 

文件目录结构:

Android.mk中引用第3方动态库_第1张图片

 

 这个问题郁闷我半个多小时,特此写下来,与大家共享,也算是记了笔记了。

 

转载于:https://www.cnblogs.com/Jade2009/p/5667899.html

你可能感兴趣的:(Android.mk中引用第3方动态库)