解决措施Image组件不能直接传入应用沙箱路径,需要传入应用沙箱uri;拿到文件的沙箱路径后,通过调用@ohos.file.fileuri模块的fileuri.getUriFromPath(file.path)将沙箱路径转化为沙箱uri,传入之后即可正常显示。参考链接@ohos.file.fileuri
解决措施
Image组件不能直接传入应用沙箱路径,需要传入应用沙箱uri;拿到文件的沙箱路径后,通过调用@ohos.file.fileuri模块的fileuri.getUriFromPath(file.path)将沙箱路径转化为沙箱uri,传入之后即可正常显示。
参考链接
@ohos.file.fileuri