在部分手机跟雷电模拟器更新成功了 但是project.manifest写入失败了 androidstudio错误日志 不知道什么原因导致的
[[ERROR]: [ERROR] file C:/ProgramData/cocos/editors/Creator/3.7.3/resources/resources/3d/engine/native/cocos/platform/FileUtils.cpp: line 1086
[ERROR]: Fail to rename file /data/user/0/com.TestProject.game/files//remote_update_file_temp/project.manifest to /data/user/0/com.TestProject.game/files//remote_update_file/project.manifest !Error code is -1
c++代码:
bool FileUtils::renameFile(const ccstd::string &oldfullpath, const ccstd::string &newfullpath) {
CC_ASSERT(!oldfullpath.empty());
CC_ASSERT(!newfullpath.empty());
int errorCode = rename(oldfullpath.c_str(), newfullpath.c_str());
if (0 != errorCode) {
CC_LOG_ERROR("Fail to rename file %s to %s !Error code is %d", oldfullpath.c_str(), newfullpath.c_str(), errorCode);
return false;
}
return true;
}
