cocos2d-x(2.0.2)的win32工程移植到Android

1.create-android-project.bat创建一个安卓项目


2. 将win32项目里的Classes拷贝到当前Classes下。然后把你win32项目里的Resources拷贝到当前Resources下(测试中发现资源也要拷贝到asserts目录才可以)。


3.编辑android.mk

LOCAL_SRC_FILES := hellocpp/main.cpp \
                   ../../Classes/AppDelegate.cpp \
                   ../../Classes/
GameScene.cpp

LOCAL_C_INCLUDES := $(LOCAL_PATH)/../../Classes \
 $(LOCAL_PATH)/../../../cocos2dx \
 $(LOCAL_PATH)/../../../cocos2dx/platform. \
 $(LOCAL_PATH)/../../../cocos2dx/include \
 $(LOCAL_PATH)/../../../cocosDension/include



$(call import-add-path, E:\commonLib\cocos2d-2.1rc0-x-2.1.3)
\
$(call import-add-path, E:\commonLib\cocos2d-2.1rc0-x-2.1.3\cocos2dx\platform\third_party\android\prebuilt)
\

$(call import-module,CocosDenshion/android) \
$(call import-module,cocos2dx) \
$(call import-module,extensions)


红色的为新增部分.


4.修改application.mk

APP_PLATFORM := android-17

实际版本看需求


5.将项目导入到eclipse


6.修改配置,编译


7.运行

你可能感兴趣的:(cocos2d-x(2.0.2)的win32工程移植到Android)