我加载SD卡下的某一个weex的js成功,但是切换不到该js同一目录的js,我该怎么写这个要切换的js的路径?求助。。。我已经试过标准的SD卡路径和file的URI路径,都不行,android
光阴似箭催人老,日月如移越少年。
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,所以不要使用WXSDKInstance的renderByUrl方法,而使用render method, just pass the content of the file you want to load directly.
assets
renderByUrl
render
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:
will load the
assets
,所以不要使用WXSDKInstance的renderByUrl
方法,而使用render
method, just pass the content of the file you want to load directly.