当前位置:网站首页>Hongmeng reads the resource file
Hongmeng reads the resource file
2022-06-23 08:26:00 【helwens】
Read the external resource file in Hongmeng API by getRawFile
But the use of this method is somewhat strange
According to official documents :
Document center
https://developer.harmonyos.com/cn/docs/documentation/doc-guides/basic-resource-file-example-0000001051733014#section126348226453 First, store the external resource files in resource/rawfile Inside
Only required for reading
this.getResourceManager().getRawFileEntry("resources/rawfile/models");
Can be read , This resources/rawfile Can't get rid of , Must be reserved to read
Once in use
this.getResourceManager().getRawFileEntry("models"); Unable to read file , That's why
However, there is another situation , Just to the back openrawfile Will go wrong
this.getResourceManager().getRawFileEntry("resources/rawfile/labels/labelmap”).openRawFile() Will report an error directly
java.io.FileNotFoundException: resources/rawfile/labels/labelmap
Change to “entry/resources/rawfile/labels/labelmap” add entry You can't report an error
So the insurance should have entry
边栏推荐
猜你喜欢

Multi-scale feature combination in target detection

Object.defineProperty() 和 数据代理

Implementation principle and source code analysis of ThreadPoolExecutor thread pool

复选框的基本使用与实现全选和反选功能
![Vulnhub | dc: 3 | [actual combat]](/img/97/e5ba86f2694fe1705c13c60484cff6.png)
Vulnhub | dc: 3 | [actual combat]

PHP serialization and deserialization CTF

自组织映射神经网络(SOM)

走好数据中台最后一公里,为什么说数据服务API是数据中台的标配?

数据资产为王,解析企业数字化转型与数据资产管理的关系

鸿蒙读取资源文件
随机推荐
After easynvr video is enabled, no video file is generated. How to solve this problem?
Markdown学习
Sequence table Curriculum
MFC radio button grouping
Azure Active Directory brute force attack
C Scrollview scroll up or scroll down
Image segmentation - improved network structure
Fillet the tabbar with the flutter
aquatone工具 中的2個bug修複
Easycvr accesses the website through the domain name. How to solve the problem that the video cannot be viewed back?
5-rotating Daisy - rotating canvas and timer
Vulnhub | DC: 4 | [combat]
谈谈 @Autowired 的实现原理
2 corrections de bogues dans l'outil aquatone
如何在conda虚拟环境开启jupyter-notebook
ArcLayoutView: 一个弧形布局的实现
Copy image bitmap by C # memory method
C RichTextBox controls the maximum number of rows
开源技术交流丨批流一体数据同步引擎ChunJun数据还原-DDL功能模块解析
爬虫框架