在OpenHarmony应用开发过程中,IDE在直接安装或者运行测试用例时会碰到如下报错:
App Launch: The hdc_std version of the SDK does not match the hdcd version of the device.
原因是IDE引用的SDK中hdc版本和设备的hdc版本不匹配。
解决方法:
1.下载最新版本hdc版本,下载地址:每日构建 | OpenHarmony CI
2.解压sdk找到std文件,替换本地sdk的hdc_std.exe文件,笔者的这个版本还需要替换libusb_shared.dll文件,否则会报错:
3.本地sdk的路径一般是:C:\Users\xxx\AppData\Local\OpenHarmony\Sdk\toolchains\xxx,可能有多个版本,确认自己使用的版本然后替换;
4.重启IDE后,问题就解决了。