打開 E:\MyGame\proj.android\jni 找到Android.mk 並修改android
LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) LOCAL_MODULE := cocos2dcpp_shared LOCAL_MODULE_FILENAME := libcocos2dcpp //加入源文件 LOCAL_SRC_FILES := hellocpp/main.cpp \ ../../Classes/AppDelegate.cpp \ ../../Classes/HelloWorldScene.cpp \ ../../Classes/Begin.cpp //頭文件所在的目錄 LOCAL_C_INCLUDES := $(LOCAL_PATH)/../../Classes //加入靜態庫 LOCAL_WHOLE_STATIC_LIBRARIES := cocos2dx_static LOCAL_WHOLE_STATIC_LIBRARIES += cocosdenshion_static LOCAL_WHOLE_STATIC_LIBRARIES += box2d_static LOCAL_WHOLE_STATIC_LIBRARIES += cocos_gui_static LOCAL_WHOLE_STATIC_LIBRARIES += cocostudio_static include $(BUILD_SHARED_LIBRARY) //靜態庫所在的位置 $(call import-module,2d) $(call import-module,audio/android) $(call import-module,Box2D) $(call import-module,ui) $(call import-module,editor-support\cocostudio)
而後雙擊運行Android.mkui