cocos2dx 3.0 项目部署到android

打开 E:\MyGame\proj.android\jni 找到Android.mk 并修改

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.mk

你可能感兴趣的:(cocos2dx 3.0 项目部署到android)