当前位置:网站首页>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
边栏推荐
- Generate code 39 extension code in batch through Excel file
- 生产环境服务器环境搭建+项目发布流程
- 1-gradients, shadows, and text
- Deep learning ----- different methods to implement lenet-5 model
- 论文阅读【Quo Vadis, Action Recognition? A New Model and the Kinetics Dataset】
- How to start Jupiter notebook in CONDA virtual environment
- 爬虫框架
- 如何评价代码质量
- Use of tensorboard
- 黄蓉真的存在吗?
猜你喜欢
随机推荐
typeScript的介绍与变量定义的基本类型
4-绘制椭圆、使用定时器
7-调色板-CALayer和触摸
Huawei ECS EIP cannot be pinged
A record of "from scratch" in college student accounts
数据资产为王,解析企业数字化转型与数据资产管理的关系
What is a dedicated server line
2 corrections de bogues dans l'outil aquatone
Copy image bitmap by C # memory method
2-用线段构成图形、坐标转换
Vulnhub | DC: 3 |【实战】
INT 104_ LEC 06
GTEST死亡测试
“方脸老师”董宇辉再回应热度下降:把农产品直播做好让农民受益 考虑去支教
力扣(LeetCode)173. 二叉搜索树迭代器(2022.06.22)
The kernel fails to shut down when the easygbs program stops. How should I optimize it? [code attached]
开源技术交流丨批流一体数据同步引擎ChunJun数据还原-DDL功能模块解析
Azure Active Directory brute force attack
5-rotating Daisy - rotating canvas and timer
你有一串代码,但是不支持低版本Go时;判断Go版本号,您值得拥有!







![Vulnhub | DC: 4 | [combat]](/img/33/b7422bdb18f39e9eb55855dbf1d584.png)

