cocos2dx: cocos2d-2.1rc0-x-2.1.2
NDK: r8e
ADK: 4.2
搭建步骤按:
1、https://github.com/cocos2d/cocos2d-x/blob/master/samples/Cpp/HelloCpp/proj.android/README.md
2、http://www.cocoachina.com/gamedev/gameengine/2012/0428/4206.html
遇到的问题:
1、AndroidManifest.xml的Icon设置错误,修改为ic_launcher
2、模拟器运行时报错 已配置gpu 选项为true
1) java.lang.IllegalArgumentException: No config chosen
解决办法在Cocos2dxActivity.java的143行添加
this.mGLSurfaceView.setEGLConfigChooser(8 , 8, 8, 8, 16, 0);
this.mGLSurfaceView.setCocos2dxRenderer(new Cocos2dxRenderer());
3、将工程转为c++ 编译不通过
1) jni/hellocpp/main.cpp 找不到 "platform/android/jni/JniHelper.h"
没解决
2) minSdkVersion 问题
参照 http://qiang106.iteye.com/blog/1765211