I meet this problem, and I try to setDesignResolutionSize,on my i9001 runs well,but unfortunately, my game runs on Nexus4 crash. The source like this below:
I have test this case:
remove ipad and idaphd folder from HelloCpp, then app crash also.
12-23 19:22:36.249: D/cocos2d-x debug info(6615): Get data from file(CloseNormal.png) failed!
12-23 19:22:36.249: D/cocos2d-x debug info(6615): Get data from file(CloseSelected.png) failed!
12-23 19:22:36.269: D/cocos2d-x debug info(6615): Get data from file(HelloWorld.png) failed!
My mistake.I put method “setDesignResolutionSize” wrong place.
Below is correct :
bool AppDelegate::applicationDidFinishLaunching()
{
// initialize director
CCDirector *pDirector = CCDirector::sharedDirector();
pDirector->setOpenGLView(CCEGLView::sharedOpenGLView());
CCEGLView::sharedOpenGLView()->setDesignResolutionSize(320,480,kResolutionExactFit);
// turn on display FPS
pDirector->setDisplayStats(true);
// set FPS. the default value is 1.0/60 if you don't call this
pDirector->setAnimationInterval(1.0 / 60);
// create a scene. it's an autorelease object
CCScene *pScene = HMenu::scene();
// run
pDirector->runWithScene(pScene);
return true;
}