报错提示: The platform version '6.0.0' and API version '14' of compatibleSdkVersion in build-profile.json5 do not match.
此时可以通过
hdc shell param get const.ohos.apiversion
需修改:
- build-profile.json5内:targetSdkVersion、compatibleSdkVersion
- DevEco Studio-Flie-Project Structure-Project-Compatible SDK,选择括号后面和系统的版本一致
之后重新运行项目。 在参考链接1中,提示需要更新设备,但因为我的设备已经是最新了,我之前默认的还是14/15,出厂版本是5.0.x,所以直接更新到6.0,之后查询设备版本,我的测试机的nova14版本是21。