HarmonyOS 鸿蒙Next 编译报错Please check @ohos/hvigor configuration and sync again

HarmonyOS 鸿蒙Next 编译报错Please check @ohos/hvigor configuration and sync again

Please check @ohos/hvigor configuration and sync again

使用的IDE版本

DevEco Studio 3.1.1 Release

Build Version: 3.1.0.501, built on June 20, 2023

Build #DS-223.8617.56.36.310501

Runtime version: 17.0.6+10-b829.5 aarch64

VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.

macOS 11.5.2

GC: G1 Young Generation, G1 Old Generation

Memory: 1536M

Cores: 8

Metal Rendering is ON

Registry:

  • external.system.auto.import.disabled=true

使用的API是6

"compileSdkVersion": 6,"compatibleSdkVersion": 6,

然后就报错

Please check @ohos/hvigor configuration and sync again.

请大佬们看看


更多关于HarmonyOS 鸿蒙Next 编译报错Please check @ohos/hvigor configuration and sync again的实战教程也可以访问 https://www.itying.com/category-93-b0.html

5 回复

跑了一下,直接报错

on finished result is 3, [INSTALL_PARSE_FAILED_USESDK_ERROR]

demo 都没有跑起来

更多关于HarmonyOS 鸿蒙Next 编译报错Please check @ohos/hvigor configuration and sync again的实战系列教程也可以访问 https://www.itying.com/category-93-b0.html


cke_132.png

用了一下这个,有问题啊

您这是新建的API9 然后手动改了6吗,这样是不能的哈!

那我怎么用wearble 模拟器呢,

那我怎么用wearble 模拟器呢,

在HarmonyOS鸿蒙Next开发过程中,编译报错“Please check @ohos/hvigor configuration and sync again”通常与项目构建工具hvigor的配置问题有关。hvigor是鸿蒙系统基于Gradle定制的构建工具,用于管理项目依赖和构建流程。

该错误的常见原因包括:

  1. hvigor配置不完整或错误:项目根目录下的hvigor配置文件(如hvigor.config.jshvigor.config.ts)可能存在缺失或配置项错误。
  2. 依赖同步问题:项目依赖未正确同步,可能是由于网络问题或依赖库版本不匹配导致的。
  3. 缓存问题:构建工具的缓存可能已损坏,导致配置无法正确加载。

解决方法:

  1. 检查hvigor配置:确保hvigor配置文件中的各项配置(如模块路径、依赖项等)正确无误。
  2. 同步依赖:执行hvigor synchvigor build命令,重新同步项目依赖。
  3. 清理缓存:尝试清理构建工具的缓存,使用hvigor clean命令清除缓存并重新构建。

如果问题仍未解决,建议检查项目的日志输出以获取更多详细信息。

回到顶部