我有三个静态库,来自一个框架,我想在我的项目中使用它们。这些库被称为
我的本地代码依赖于它们,因此我想将它们包含在我的共享库中。
根据我在stackoverflow和Google上阅读到的内容,我认为android.mk应该如下所示:
我的 Application.mk:
我在编译时(从项目目录执行“ndk-build”命令)遇到的错误是:
libtinySAK_armv7-a.a、libtinyNET_armv7-a.a 和 libtinyHTTP_armv7-a.a
。我已经将它们放在与Android.mk
和Application.mk
相同的文件夹中。我的本地代码依赖于它们,因此我想将它们包含在我的共享库中。
根据我在stackoverflow和Google上阅读到的内容,我认为android.mk应该如下所示:
# TINYSAK
include $(CLEAR_VARS)
LOCAL_MODULE := tinySAK
LOCAL_SRC_FILES := libtinySAK_armv7-a.a
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/../../../doubango/tinySAK/src/
include $(PREBUILT_STATIC_LIBRARY)
# TINYNET
include $(CLEAR_VARS)
LOCAL_MODULE := tinyNET
LOCAL_SRC_FILES := libtinyNET_armv7-a.a
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/../../../doubango/tinyNET/src/
include $(PREBUILT_STATIC_LIBRARY)
# TINYHTTP
include $(CLEAR_VARS)
LOCAL_MODULE := tinyHTTP
LOCAL_SRC_FILES := libtinyHTTP_armv7-a.a
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/../../../doubango/tinyHTTP/include/
include $(PREBUILT_STATIC_LIBRARY)
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := libtest
LOCAL_SRC_FILES := \
../../test/stack.cpp \
../../test/main.cpp
LOCAL_C_INCLUDES := \
$(LOCAL_PATH)/../../test/include/ \
$(LOCAL_PATH)/../../../doubango/tinyHTTP/include/ \
$(LOCAL_PATH)/../../../doubango/tinySAK/src/ \
$(LOCAL_PATH)/../../../doubango/tinyNET/src/
LOCAL_STATIC_LIBRARIES := \
tinySAK \
tinyNET \
tinyHTTP
include $(BUILD_SHARED_LIBRARY)
我的 Application.mk:
APP_STL := stlport_static
APP_ABI := armeabi-v7a
我在编译时(从项目目录执行“ndk-build”命令)遇到的错误是:
jni/Android.mk:tinySAK: LOCAL_SRC_FILES points to a missing file
我想其他两个库也失败了。为什么找不到它们? 除此之外,我的makefile中还有其他错误吗?
谢谢。