发现android 调试总是报错,loop or previous error loading module ‘src/main.lua’
自己修改如下,暂时解决了问题
修改runtime
void initRuntime()
{
vectorstd::string searchPathArray = FileUtils::getInstance()->getSearchPaths();
#if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32 || CC_TARGET_PLATFORM == CC_PLATFORM_MAC)
extern std::string getCurAppPath();
std::string appPath = getCurAppPath();
#if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32)
appPath.append("/…/…/");
#elif (CC_TARGET_PLATFORM == CC_PLATFORM_MAC)
appPath.append("/…/…/…/");
#endif
appPath = replaceAll(appPath, “\”, “/”);
g_projectPath = appPath;
// add project’s root directory to search path
searchPathArray.insert(searchPathArray.begin(), g_projectPath);
#endif
// add writable path to search path
searchPathArray.insert(searchPathArray.begin(), FileServer::getShareInstance()->getWritePath());
std::string srcPath = FileServer::getShareInstance()->getWritePath() + “src/”;
searchPathArray.insert(searchPathArray.begin(), srcPath);
// searchPathArray.insert(searchPathArray.begin(),“src”);
FileUtils::getInstance()->setSearchPaths(searchPathArray);
//FileUtils::getInstance()->addSearchPath(“src”);
std::string resPath = FileServer::getShareInstance()->getWritePath() + “res/”;
FileUtils::getInstance()->addSearchPath(resPath);