weex - android关于加载sd卡下js问题,不是assets?
大家讲道理
大家讲道理 2017-04-18 09:19:32
0
1
471

我加载SD卡下的某一个weex的js成功,但是切换不到该js同一目录的js,我该怎么写这个要切换的js的路径?求助。。。我已经试过标准的SD卡路径和file的URI路径,都不行,android

大家讲道理
大家讲道理

光阴似箭催人老,日月如移越少年。

reply all(1)
迷茫

It’s not a problem with the path. If you load a local file and pass the path, the default execution will be as follows:

    if (uri != null && TextUtils.equals(uri.getScheme(), "file")) {
      render(pageName, WXFileUtils.loadAsset(assembleFilePath(uri), mContext), renderOptions, jsonInitData, flag);
      return;
    }

will load the assets,所以不要使用WXSDKInstancerenderByUrl方法,而使用render method, just pass the content of the file you want to load directly.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!