安卓机打开pdf一直有这个问题: wx.downloadFile({ url: fileUrl, success(res) { console.log(res, '下载成功'); const filePath = res.tempFilePath; wx.openDocument({ filePath: filePath, fileType: 'pdf', showMenu: true, success: function (res) { wx.showToast({ title: '打开文档成功', icon: 'none' }); }, fail: function (res) { wx.showToast({ title: '打开文档失败', icon: 'none' }); console.error('打开文档失败', res); } }); }, fail(res) { wx.showToast({ title: '下载文件失败', icon: 'none' }); console.error('下载文件失败', res); } });
安卓真机上调用wx.openDocument打开文档失败?在安卓真机上调用wx.openDocument一直打开不了,报错:document viewer already starting。 但是在开发者工具和ios真机上都能打开成功。 [图片]
04-17