当前位置:   article > 正文

This device type does not match the project profile. Error while Deploying HAP_the type of the target device does not match the d

the type of the target device does not match the devicetype configured in th

背景:

在运行鸿蒙HarmonyOS项目时,出现了如下报错信息

解决办法:

     提示说 此设备类型与项目配置文件不匹配。部署HAP时出错。 之所以出现该问题是因为,我在创建项目时选择的是基于电视的,但是在运行项目时,设备却是手表,所以导致配置文件不匹配。

     出现该错误,只需打开鸿蒙HarmonyOS项目下的 entry>>src>>main>>config.json文件,然后将

  1. "deviceType": [
  2. "tv"
  3. ],

改为

  1. "deviceType": [
  2. "wearable"
  3. ],

即可

效果图如下:

声明:本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:【wpsshop博客】
推荐阅读
相关标签
  

闽ICP备14008679号