Android NDK构建共享库 - 中止 - 停止。 local_module_filename不得包含文件扩展名

时间:2016-04-01 07:20:06

标签: android c++ boost android-ndk

这是我的 Android.mk

LOCAL_PATH := $(call my-dir)

LOCAL_STATIC_LIBRARIES = -lboost_system ...
include $(CLEAR_VARS)

LOCAL_MODULE    := AVL
LOCAL_MODULE_FILENAME:= libAVL
LOCAL_SRC_FILES := AVL.cpp    

LOCAL_CFLAGS += -I$(LOCAL_PATH)/boost/include/boost-1_55    

LOCAL_CPPFLAGS += -fexceptions
LOCAL_CPPFLAGS += -frtti

include $(BUILD_SHARED_LIBRARY)
include $(BUILD_STATIC_LIBRARY) 

Application.mk

APP_ABI := all
APP_STL := stlport_static

错误:

Android NDK: jni/Android.mk:AVL: LOCAL_MODULE_FILENAME must not contain a file extension    
/home/manevbg/Documents/android-sdks/android-ndk-r10/build/core/build-static-library.mk:29: *** Android NDK: Aborting    .  Stop.

知道如何构建共享库吗? PP:使用eclipse。

1 个答案:

答案 0 :(得分:0)

删除LOCAL_MODULE_FILENAME:= libAVL。构建系统将正确地在库中添加' lib'对你而言。