我正在尝试在我的 phonegap 项目中读取 pdf 文件。
我已经成功安装了https://github.com/pwlin/cordova-plugin-file-opener2.git
插件。但是,当我尝试使用该功能读取文件时...
function onDeviceReady() {
cordova.plugins.fileOpener2.open(
'file:///sdcard/Download/readme.pdf',
'application/pdf', {
error: function(errorObj) {
alert('Error status: ' + errorObj.status + ' - Error message: ' + errorObj.message);
},
success: function() {
alert('file opened successfully');
}
}
);
}
我的日志猫说……
TypeError: Cannot read property 'fileopener2' of undefined at line
我试图在哪里调用 open 方法..
其他 logcat 错误包括
Falling back on prompt mode since _cordovaNative is missing. Expected for Android 3.2 and lower only.
phonegap.js: line 1548: could not find cordova.js script tag. plugin load may fail
请帮忙