今天终于成功将自己编写的cocos2dx工程移植到了安卓平台上了
移植所需的工具:JDK、android_ndk(400多M)、集成eclipse开发环境。
移植过程中出现的问题:
在Eclipse中编译后出现这个错误:D:\work\cocos2d-x-2.2.5/extensions/CocoStudio/Reader/WidgetReader/LabelReader/LabelReader.cpp: In member function 'virtual void cocos2d::extension::LabelReader::setPropsFromJsonDictionary(cocos2d::ui::Widget*, const Value&)':
D:\work\cocos2d-x-2.2.5/extensions/CocoStudio/Reader/WidgetReader/LabelReader/LabelReader.cpp:54:9: error: 'transform' is not a member of 'std'
解决办法:找到出错的文件:lablereader.cpp,添加一个头文件即可
#include <algorithm> <----- 新加的
#include "LabelReader.h"
#include "../../../GUI/UIWidgets/UILabel.h"