c++里增加内容如下
#include “cocos-ext.h”
#include “CocosGUI.h”
#include “cocostudio/CocoStudio.h”
USING_NS_CC;
USING_NS_CC_EXT;
using namespace ui;
auto _layout = dynamic_cast<Layout*>(cocostudio::GUIReader::getInstance()->widgetFromJsonFile(“ui.ExportJson”));
addchild(_layout);
在win32环境下运行成功,但是移植到Android后总是出错。
Android项目只修改了Android.mk文件,编译通过,但是在手机上运行闪退
我用的是win7 64位+cocos2dx3.0,原本以为是手机有问题,但cocos2dx3.0的testcpp编译后在手机上运行正常的