HarmonyOS 鸿蒙Next 新建工程后无法在模拟器上运行 提示Please try to match the API version of the device and the app

HarmonyOS 鸿蒙Next 新建工程后无法在模拟器上运行 提示Please try to match the API version of the device and the app

完整提示

Please try to match the API version of the device and the app. \
The current device does not contain the following SysCap attributes in the rpcid.json file: \
SystemCapability.ArkUI.ArkUI.Libuv, \
SystemCapability.ArkUi.Graphics3D. \
Make sure the device supports all the SysCap attributes required for running the app.

虚拟机版本是Phone HarmonyOS 5.0.1(13)

Deveco信息:

DevEco Studio 5.0.2 Release\
Build #DS-233.14475.28.36.507200\
Build Version: 5.0.7.200, built on January 23, 2025\
Runtime version: 17.0.12+1-b1087.25 amd64\
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.\
Windows 11.0\
GC: G1 Young Generation, G1 Old Generation\
Memory: 1536M\
Cores: 12\
Registry:
  idea.plugins.compatible.build=IC-233.14475.28

项目配置信息:

"compileSdkVersion": 14,
"compatibleSdkVersion": 12,
"runtimeOS": "OpenHarmony",

项目是按照教程创建,构建成功但是运行失败。
我是新手希望能有任何相关建议帮助项目正常运行。


更多关于HarmonyOS 鸿蒙Next 新建工程后无法在模拟器上运行 提示Please try to match the API version of the device and the app的实战教程也可以访问 https://www.itying.com/category-93-b0.html

6 回复

hi 兄弟运行起来了吗,我运行一个开源项目也出现了这个问题

更多关于HarmonyOS 鸿蒙Next 新建工程后无法在模拟器上运行 提示Please try to match the API version of the device and the app的实战系列教程也可以访问 https://www.itying.com/category-93-b0.html


一般来说应该是创建的harmonyOS项目吧

你是想要创建openharmony工程还是harmonyOS工程

harmonyOS是

"compatibleSdkVersion": "12",  (或者13都行,不知道14可以不)
"runtimeOS": "HarmonyOS"

如果就是想要openharmony工程的话,你好像需要自己下载openharmony的SDK并且配置好地址

找HarmonyOS工作还需要会Flutter的哦,有需要Flutter教程的可以学学大地老师的教程,很不错,B站免费学的哦:BV1S4411E7LY/?p=17

SDK下载是有的,按照你的方法试了一下还是不行,是不是需要控制系统能力,

针对帖子标题中提到的HarmonyOS 鸿蒙Next新建工程后无法在模拟器上运行,且提示“Please try to match the API version of the device and the app”的问题,可以直接从API版本匹配的角度进行回答:

该错误提示表明你的应用程序与模拟器的API版本不匹配。在HarmonyOS开发中,确保应用与运行环境的API版本兼容至关重要。以下是解决此问题的步骤:

  1. 检查应用API级别:在你的工程配置文件中,查看指定的目标API级别。这通常在config.json或类似的配置文件中设置。

  2. 核对模拟器API级别:启动模拟器后,查看其API级别。这通常可以在模拟器的设置或关于信息中找到。

  3. 匹配API级别:确保应用的API级别与模拟器的API级别相匹配。如果不匹配,你需要调整应用的API级别或选择一个与目标API级别相符的模拟器镜像。

  4. 重新编译并部署:在调整了API级别后,重新编译你的应用并部署到模拟器上。

如果经过上述步骤后问题依旧无法解决,请检查是否有其他配置错误或依赖问题。如果问题依旧没法解决请联系官网客服,官网地址是:https://www.itying.com/category-93-b0.html

回到顶部