错误信息类似:
hvigor ERROR: Failed :entry:default@CompileArkTS...
hvigor ERROR: Unexpected token (Note that you need plugins to import files that are not JavaScript)

需要在项目根目录中的hvigor文件夹下hvigor-config.json5文件中新增一行

"properties": {
  "ohos.nativeResolver": false
},
Logo

更多推荐