在HarmonyOS的虚拟机上要运行openharmony的工程时需要修改的地方有
1.修改build-profile.json5,将runtimeOS改为HarmonyOS文章来源:https://www.toymoban.com/news/detail-735024.html
"targets": [
{
"name": "default",
"runtimeOS": "HarmonyOS"
},
2.修改工程引用的SDK,在文件local.properties上将sdk.dir的openharmony sdk改为hwsdk.dir的HarmonyOS的sdk文章来源地址https://www.toymoban.com/news/detail-735024.html
# This file is automatically generated by DevEco Studio.
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
#
# This file should *NOT* be checked into Version Control Systems,
# as it contains information specific to your local configuration.
#
# For customization when using a Version Control System, please read the header note.
#sdk.dir=C:/Users/pang/AppData/Local/OpenHarmony/Sdk
hwsdk.dir=C:/Users/pang/AppData/Local/Huawei/Sdk
nodejs.dir=C:/Users/pang/nodejs
到了这里,关于OpenHamony开发笔记一:在HarmonyOS虚拟机上运行openharmony工程的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!