HarmonyOS鸿蒙Next中使用官方代码包中的constantsCommon(复制)报错,There are some dependency names that are inconsistent with the actual package names.
HarmonyOS鸿蒙Next中使用官方代码包中的constantsCommon(复制)报错,There are some dependency names that are inconsistent with the actual package names.
使用官方代码包中的constantsCommon报错,在entry中配置
{
"[@ohos](/user/ohos)/constantsCommon": "file:../common/constantsCommon"
}
出现飘红情况,ohpm install报错,代码包已上传(附件解压码123)
已测试不是大小写问题,依赖路径点击可跳转,但是飘红无法正常执行ohpm install
版本:DevEco Studio 5.0.4 Release
环境:Win10X64
错误码:
ohpm ERROR: local dependency “@ohos/constantsCommon” found in “D:\code\project-copilot\app_hm\entry\oh-package.json5” does not match the actual name “constantscommon” of its oh-package.json5
ohpm ERROR: Install failed, detail: There are some dependency names that are inconsistent with the actual package names。
截图: 
请注意,截图部分的图片链接可能需要根据实际情况进行处理。
更多关于HarmonyOS鸿蒙Next中使用官方代码包中的constantsCommon(复制)报错,There are some dependency names that are inconsistent with the actual package names.的实战教程也可以访问 https://www.itying.com/category-93-b0.html
更多关于HarmonyOS鸿蒙Next中使用官方代码包中的constantsCommon(复制)报错,There are some dependency names that are inconsistent with the actual package names.的实战系列教程也可以访问 https://www.itying.com/category-93-b0.html
在HarmonyOS鸿蒙Next中,使用官方代码包中的constantsCommon
时出现依赖名称与实际包名不一致的错误,通常是由于依赖库的版本或名称不匹配导致的。建议检查build.gradle
或oh-package.json5
文件中的依赖声明,确保所有依赖的包名和版本与官方文档一致。如果问题仍然存在,可以尝试清理项目缓存并重新构建,或者更新相关依赖到最新版本。