本人是新手……
在安卓上发现这问题……
首先代码是这样写的。
UserDefault::getInstance()->setStringForKey("Test","Test");
UserDefault::getInstance()->flush();
information->setString(StringUtils::format("It is newest version!"));
string str;
str = "WritablePath:\n";
str += FileUtils::getInstance()->getWritablePath();
str += "\n";
str += "XMLFilePath:\n";
str += UserDefault::getInstance()->getXMLFilePath();
str += "\n";
string xmlFilePath = UserDefault::getInstance()->getXMLFilePath();
int isFileExist = (int)FileUtils::getInstance()->isFileExist(xmlFilePath);
str += "Check file:" + StringUtils::format("%d",isFileExist);
information->setString(str.c_str());
```
infomation是一个label,显示信息用的……
然后win32是这么一个结果……是正常的。

然后Android上是这样的:

然后我用RE文件浏览器查了路径,还真没有UserDefault.xml。不知道为什么Android上没这个文件。
因为这个问题,导致项目在Android上不能正常的跑了……
首次在这里发帖……
向各位求教……