【发布时间】:2017-01-19 14:17:33
【问题描述】:
使用 WebViewer 文件夹中的 Android 示例,我在 Android Studio 中有一个应用程序,当它在我的设备上运行时,它可以正常工作并按预期显示给定的 xod 文件。但是我试图改变线路:
String documentPath = getFilesDir().getPath() + "/GettingStarted.xod";
InputStream in = getAssets().open("xod/GettingStarted.xod");
到
String documentPath = getFilesDir().getPath() + "/sample.pdf";
InputStream in = getAssets().open("xod/sample.pdf");
并且还将endsWith(".xod") 更改为endsWith(".pdf") 但我只得到一个灰屏。为此,文件必须是 .xod 吗?因为它适用于 xod 文件,但不适用于 pdf 文件。
感谢您的宝贵时间。
【问题讨论】:
-
我刚刚也将 android:pathPattern=".*\\.xod" 替换为 android:pathPattern=".*\\.pdf" 我现在收到以下错误 - “未捕获的错误:加载文档时出错:错误:签名错误!”并且源文件指向 CoreControls.js。只是觉得 id 提到了这个更新,因为它可能有助于解决它