如何插入fileopener插件?插件、fileopener

2023-09-05 05:21:50 作者:爱情宣言终是谎言

我下面这篇文章。 科尔多瓦打开PDF - fileOpener2

插件配置正确,但它不工作。我得到以下异常:

The plug-in is correctly configured, but it is not working. I get the following exception:

8月10日至27日:05:38.380:W / System.err的(2054):   java.net.MalformedURLException:没有安装处理器此网址   8月10日至27日:05:38.380:W / System.err的(2054):在   org.apache.cordova.file.FileUtils.resolveLocalFileSystemURI(FileUtils.java:626)   8月10日至27日:05:38.380:W / System.err的(2054):在   org.apache.cordova.file.FileUtils.access $ 400(FileUtils.java:52)10-27   08:05:38.380:W / System.err的(2054):在   org.apache.cordova.file.FileUtils $ 14.run(FileUtils.java:385)10-27   08:05:38.380:W / System.err的(2054):在   org.apache.cordova.file.FileUtils $ 25.run(FileUtils.java:551)

10-27 08:05:38.380: W/System.err(2054): java.net.MalformedURLException: No installed handlers for this URL 10-27 08:05:38.380: W/System.err(2054): at org.apache.cordova.file.FileUtils.resolveLocalFileSystemURI(FileUtils.java:626) 10-27 08:05:38.380: W/System.err(2054): at org.apache.cordova.file.FileUtils.access$400(FileUtils.java:52) 10-27 08:05:38.380: W/System.err(2054): at org.apache.cordova.file.FileUtils$14.run(FileUtils.java:385) 10-27 08:05:38.380: W/System.err(2054): at org.apache.cordova.file.FileUtils$25.run(FileUtils.java:551)

我的项目: https://www.dropbox.com/s /e583djlhk0mm6sr/pdf.rar?dl=0

相关code在FileOpenerPlugin.java

The relevant code is in FileOpenerPlugin.java

推荐答案

我看你提供的项目...它的似乎的正确配置。但是...你有一个调用的函数 openPDF(),但你不能从你的code的任何地方调用它

I'm looking at your provided project... it seems to be correctly configured. But... you have a function called "openPDF()", but you're not calling it from anywhere in your code.

请使用您的功能,否则它会只是坐在那里,什么也不做。

Make use of your function, otherwise it'll just sit there and do nothing.