方法1. 问题应该是项目的资源路径没有设置好,在AppDelegate::applicationDidFinishLaunching()中添加如下代码:
//add search paths/////////////////////////////
string strPath = CCFileUtils::getInstance()->getWritablePath();
vector<string> vtPath = CCFileUtils::getInstance()->getSearchPaths();
vtPath.push_back(strPath + "res/");
vtPath.push_back(strPath + "src/");
CCFileUtils::getInstance()->setSearchPaths(vtPath);
/////////////////////////////////////////////