在HarmonyOS的虚拟机上要运行openharmony的工程时需要修改的地方有
1.修改build-profile.json5,将runtimeOS改为HarmonyOS
- "targets": [
- {
- "name": "default",
- "runtimeOS": "HarmonyOS"
- },
2.修改工程引用的SDK,在文件local.properties上将sdk.dir的openharmony sdk改为hwsdk.dir的HarmonyOS的sdk
- # 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