我想为我的离子安卓应用使用org.apache.cordova.file插件。对象窗口没有方法resolveLocalFileSystemURL
此外,我使用ngcordova扩展(它为您提供了最流行的Cordova和PhoneGap插件的简单AngularJS包装,您可以拍照,扫描条形码,上传文件,打开手电筒,目前的位置,以及更多,只需几行代码)。
我安装了ngcordova,你可以在文档中看到,“条码扫描器插件”工作完美,但如果我想使用“文件插件“,我总是有个例外:
对象窗口没有方法resolveLocalFileSystemURL
的ngcordova扩展中的代码片段:
try {
$window.resolveLocalFileSystemURL(path, function (fileSystem) {
fileSystem.getFile(file, {create: false}, function (fileEntry) {
fileEntry.file(function (fileData) {
var reader = new FileReader();
我已经通过添加插件
科尔多瓦插件添加科尔多瓦 - 插件文件
而且我有新增
cordova插件添加cordova-plugin-file-transfer