Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

not supported by:docx、not supported by:pdf #10

Closed
Qdafengzi opened this issue Oct 17, 2017 · 7 comments
Closed

not supported by:docx、not supported by:pdf #10

Qdafengzi opened this issue Oct 17, 2017 · 7 comments

Comments

@Qdafengzi
Copy link

前几天还是可以的,现在一直报这样的错误!

10-17 11:10:38.375 22880-22880/com.silang.superfileview D/FileDisplayActivity: 文件path:/storage/emulated/0/test.docx
10-17 11:10:38.376 22880-22880/com.silang.superfileview D/superFileLog: /storage/emulated/0/test.docx
10-17 11:10:38.376 22880-22880/com.silang.superfileview D/SuperFileView: paramString:/storage/emulated/0/test.docx
10-17 11:10:38.376 22880-22880/com.silang.superfileview D/SuperFileView: paramString.substring(i + 1)------>docx
10-17 11:10:38.383 22880-22880/com.silang.superfileview E/TbsReaderView: not supported by:docx
10-17 11:10:38.483 22880-22880/com.silang.superfileview I/Timeline: Timeline: Activity_idle id: android.os.BinderProxy@28738328 time:92399976
10-17 11:10:50.969 22880-22880/com.silang.superfileview I/Timeline: Timeline: Activity_idle id: android.os.BinderProxy@15a6c1d9 time:92412462
10-17 11:10:51.255 22880-22880/com.silang.superfileview D/superFileLog: FileDisplayActivity-->onDestroy
10-17 11:10:51.874 22880-22880/com.silang.superfileview W/EasyPermissions: hasPermissions: API version < M, returning true by default
10-17 11:10:51.874 22880-22880/com.silang.superfileview I/Timeline: Timeline: Activity_launch_request id:com.silang.superfileview time:92413368
10-17 11:10:51.981 22880-22880/com.silang.superfileview D/FileDisplayActivity: 文件path:/storage/emulated/0/test.pdf
10-17 11:10:51.982 22880-22880/com.silang.superfileview D/superFileLog: /storage/emulated/0/test.pdf
10-17 11:10:51.982 22880-22880/com.silang.superfileview D/SuperFileView: paramString:/storage/emulated/0/test.pdf
10-17 11:10:51.982 22880-22880/com.silang.superfileview D/SuperFileView: paramString.substring(i + 1)------>pdf
10-17 11:10:51.990 22880-22880/com.silang.superfileview E/TbsReaderView: not supported by:pdf

@ZhongXiaoHong
Copy link
Owner

ZhongXiaoHong commented Oct 18, 2017

@Qdafengzi
1.在demo的App.java的oncreat方法做QBsdK的初始化,如下:
public class App extends Application {
@OverRide
public void onCreate() {
super.onCreate();
//增加这句话
QbSdk.initX5Environment(this,null);
ExceptionHandler.getInstance().initConfig(this);
}
2.还是出现这个错误提示额话,在打开文件之前先使用com.tencent.smtt.sdk.WebView随便打开一个网页,这样会将tbs内核加载

3.上面两部都无效的话,下载检测工具,输入包名com.silang.superFileView进行内核加载检测,
下载工具地址:https://x5.tencent.com/tbs/guide/sdkInit.html

@Qdafengzi
Copy link
Author

第一步就可以解决了。
支不支持Html文件 ?
还有我给你发了邮件,貌似以后不再提供服务了。

@ZhongXiaoHong
Copy link
Owner

@Qdafengzi 你可以使用com.tencent.smtt.sdk.WebView来加载html文件 你说的服务不提供是什么意思?

@HaoPz
Copy link

HaoPz commented Oct 18, 2017

QbSdk.initX5Environment(this,null);
// @ZhongXiaoHong 直接加载
QbSdk.initX5Environment(this, new QbSdk.PreInitCallback() {
@OverRide
public void onCoreInitFinished() {
//x5内核初始化完成回调接口,此接口回调并表示已经加载起来了x5,有可能特殊情况下x5内核加载失败,切换到系统内核。

        }

        @Override
        public void onViewInitFinished(boolean b) {
            //x5內核初始化完成的回调,为true表示x5内核加载成功,否则表示x5内核加载失败,会自动切换到系统内核。
            Log.e("**************","加载内核是否成功:"+b);
        }
    });

@zhouyangwen
Copy link

在移植到自己的应用后,public void onViewInitFinished(boolean b)总是放回false,解包apk确认了liblbs.so已经打包成功,且 abiFilters "armeabi"也仅设置为32位的,但是依旧报此错误,请问,是不是对应用的包名还有过滤呢?

@zhouyangwen
Copy link

由于考虑到可能存在.so放射调用java,所以对于LoadFileApi的路径我是没有修改的

@GeekBugs
Copy link

GeekBugs commented May 4, 2021

这应该是TBS缓存的问题,可以当preOpen返回false的时候调用QbSdk.clearAllWebViewCache(context, true)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants