工程目录下 \proj.android\jni文件夹下的 Android.mk文件需要配置cpp路径(具体操作为把
LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) LOCAL_MODULE := cocos2dcpp_shared LOCAL_MODULE_FILENAME := libcocos2dcpp define walk $(wildcard $(1)) $(foreach e,$(wildcard $(1)/*),$(call walk,$(e))) endef ALLFILES = $(call walk,$(LOCAL_PATH)/../../Classes) FILE_LIST := hellocpp/main.cpp FILE_LIST += $(filter %.cpp,$(ALLFILES)) LOCAL_SRC_FILES := $(FILE_LIST:$(LOCAL_PATH)/%=%) LOCAL_C_INCLUDES := $(LOCAL_PATH)/../../Classes # _COCOS_HEADER_ANDROID_BEGIN # _COCOS_HEADER_ANDROID_END LOCAL_STATIC_LIBRARIES := cocos2dx_static # _COCOS_LIB_ANDROID_BEGIN # _COCOS_LIB_ANDROID_END include $(BUILD_SHARED_LIBRARY) $(call import-module,./prebuilt-mk) # _COCOS_LIB_IMPORT_ANDROID_BEGIN # _COCOS_LIB_IMPORT_ANDROID_END
保存之后再打包就不会报错了)