我加载SD卡下的某一个weex的js成功,但是切换不到该js同一目录的js,我该怎么写这个要切换的js的路径?求助。。。我已经试过标准的SD卡路径和file的URI路径,都不行,android
迷茫2017-04-18 09:21:32
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.