错误为:
Android.mk文件
c++的调用方法为:
复制代码 代码如下:
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := TestNdk
LOCAL_CPP_EXTENSION :=com_ndk_test_JniClient.cpp
include $(BUILD_SHARED_LIBRARY)
c中的调用方法:
复制代码 代码如下:
LOCAL_SRC_FILES := com_ndk_test_JniClient.c
另一个使用变量的方法,一直成功运行
c++正确的mk文件:
复制代码 代码如下:
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := TestSm3
LS_CPP=$(subst $(1)/,,$(wildcard $(1)/*.cpp))
LOCAL_SRC_FILES := $(call LS_CPP,$(LOCAL_PATH))
include $(BUILD_SHARED_LIBRARY)