报错提示:
保存到公共下载目录失败:targetSdkVersion设置>=29后在Android10 系统设备不支持当前路径。请更改为应用运行路径!
plus.io.resolveLocalFileSystemURL(
filePath,
function (entry) {
const cachePath = plus.io.convertLocalFileSystemURL("_cache");
//安卓10+上无法保存到指定文件
console.log("_cache", entry.name, cachePath);
entry.copyTo(
cachePath,
entry.name,
function (newEntry) {
console.log("文件已保存到公共下载目录:" + newEntry.fullPath);
},
function (e) {
console.log("保存到公共下载目录失败:" + e.message);
}
);
},
function (e) {
console.log("解析文件路径失败:" + e.message);
}
);
外壳运行在自定义基座上,对了一下 cachePath 路里的包名没问题。但是还是报错了,为什么还是不能拷贝啊
为什么都使用的是私有应用路径了还是不行啊?应用运行路径是?
0 个回复