新创建了工程后无法在模拟器上运行,提示Please try to match the API version of the device and the app。模拟器版本是HarmonyOS 5.0.1(13),DevEco版本5.0.2Release,项目配置信息:
"compileSdkVersion": 14, "compatibleSdkVersion": 12, "runtimeOS": "OpenHarmony",
DevEco Studio提供了基础的工程模板资源,不同模板支持的设备类型、API Version不同。OpenHarmony项目不可运行在模拟器上,需在开源设备上运行。创建和配置新工程文档中提供了创建HarmonyOS工程和创建OpenHarmony工程两种工程模板的创建方式,直接创建HarmonyOS工程即可。
Q:工程检查报错,提示“Incorrect settings found in the build-profile.json5 file”?
A:排查工程级build-profile.json5文件配置,可根据规范检查并修改配置。