新建项目启动报错提示如下,注:项目安装已安装toolchains:3.2.12.5
> hvigor Downloading sdk components [toolchains] of API9...
at /Users/van/Library/Huawei/Sdk
The SDK license agreement is not accepted.
Detail: Go to Tools > SDK Manager > SDK > HarmonyOS, download the Toolchains:3.2.3.6 SDK, and accept the license agreement. Open SDK Manager
> hvigor ERROR: Sdk download failed.
> hvigor ERROR: BUILD FAILED in 1 s 538 ms
问题原因不太清除,查询到以下解决方案,亲测有效
windows下打开下面目录的文件。(注:此目录不是安装路径,此路径是程序运行后自己生成的运行时数据目录,所以应该都一样)
C:\Users\用户名\AppData\Roaming\Huawei\DevEcoStudio3.1\options\country.region.xml
<application>
<component name="CountryRegionSetting">
<countryregion name="CN"/>
</component>
</application>
如果里面不是CN就改成CN(指中国);然后打开安装SDK的位置会多出下图红框部分
然后勾选toolchains:3.2.3.6点击应用按钮进行安装,之后再重启应该就好了。