Error:Module cordova-plugin-file.FileWriter does not exit. /static/js/libs/cordova/ios/cordova.js:1365:69
时间: 2023-07-26 19:04:01 浏览: 211
这个错误通常是由于缺少 cordova-plugin-file
插件或版本不匹配导致的。请确保已经正确安装了 cordova-plugin-file
插件,并且其版本与项目中对应的 cordova-ios
版本匹配。
您可以尝试使用以下命令重新安装 cordova-plugin-file
插件:
cordova plugin remove cordova-plugin-file
cordova plugin add cordova-plugin-file
如果问题仍然存在,请尝试更新您的 cordova-ios
版本到最新版本。
cordova platform remove ios
cordova platform add ios
如果问题仍然无法解决,请检查您的代码,确保没有拼写错误,或者查看其他可能导致此问题的原因。
相关问题
APK 在真机测试中如何获取data/user/0/com.things.xmes/files/cordova-hot-code-push-plugin/2023.06.10-13.45.42/wwu 这个地址
在真机测试中获取/data/user/0/com.things.xmes/files/cordova-hot-code-push-plugin/2023.06.10-13.45.42/wwu 这个地址,可以使用以下代码:
File file = new File(getFilesDir().getAbsolutePath() + "/cordova-hot-code-push-plugin/2023.06.10-13.45.42/wwu");
String filePath = file.getAbsolutePath();
其中,getFilesDir()方法会返回app的内部文件存储路径,然后我们拼接上文件路径即可获取到文件的绝对路径。请注意,这个路径是应用程序私有的,只能被该应用程序访问。
如果您想在外部存储器中访问文件,可以使用getExternalFilesDir()方法,它会返回应用程序在外部存储设备上的私有目录。例如:
File file = new File(getExternalFilesDir(null).getAbsolutePath() + "/cordova-hot-code-push-plugin/2023.06.10-13.45.42/wwu");
String filePath = file.getAbsolutePath();
这样就可以获取到文件在外部存储器中的绝对路径了。请注意,这个路径也是应用程序私有的,只能被该应用程序访问。
相关推荐
















