我想构建具有相同名称的共享和静态库,但我有一个错误:
Android NDK: But this module was already defined by path/to/Android.mk
Android.mk:
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := j
LOCAL_SRC_FILES := j.c
include $(BUILD_SHARED_LIBRARY)
include $(CLEAR_VARS)
LOCAL_MODULE := j
LOCAL_SRC_FILES := j.c
include $(BUILD_STATIC_LIBRARY)
我想发布共享和静态库。
答案 0 :(得分:0)
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := j_shared
LOCAL_MODULE_FILENAME := libj
LOCAL_SRC_FILES := j.c
include $(BUILD_SHARED_LIBRARY)
include $(CLEAR_VARS)
LOCAL_MODULE := j
LOCAL_SRC_FILES := j.c
include $(BUILD_STATIC_LIBRARY)
请注意,应明确设置lib
前缀,但不应提供.so
后缀。