使用ServiceAbility例程,在执行Gradle: Download hap-3.0.3.4 pom...时报错?

Starting Gradle Daemon...

Gradle Daemon started in 2 s 153 ms

FAILURE: Build failed with an exception.

* What went wrong:

A problem occurred configuring root project 'ServiceAbility'.

> Could not resolve all files for configuration ':classpath'.

   > Could not resolve com.huawei.ohos:hap:3.0.3.4.

     Required by:

         project :

      > Could not resolve com.huawei.ohos:hap:3.0.3.4.

         > Could not get resource 'https://repo.huaweicloud.com/repository/maven/com/huawei/ohos/hap/3.0.3.4/hap-3.0.3.4.pom'.

            > Could not GET 'https://repo.huaweicloud.com/repository/maven/com/huawei/ohos/hap/3.0.3.4/hap-3.0.3.4.pom'.

               > Connect to repo.huaweicloud.com:443 [repo.huaweicloud.com/127.0.1.2] failed: Connection refused: connect

      > Could not resolve com.huawei.ohos:hap:3.0.3.4.

         > Could not get resource 'https://developer.huawei.com/repo/com/huawei/ohos/hap/3.0.3.4/hap-3.0.3.4.pom'.

            > Could not GET 'https://developer.huawei.com/repo/com/huawei/ohos/hap/3.0.3.4/hap-3.0.3.4.pom'.

               > Connect to developer.huawei.com:443 [developer.huawei.com/127.0.1.3] failed: Connection refused: connect

      > Could not resolve com.huawei.ohos:hap:3.0.3.4.

         > Could not get resource 'https://jcenter.bintray.com/com/huawei/ohos/hap/3.0.3.4/hap-3.0.3.4.pom'.

            > Could not GET 'https://jcenter.bintray.com/com/huawei/ohos/hap/3.0.3.4/hap-3.0.3.4.pom'.

               > Connect to jcenter.bintray.com:443 [jcenter.bintray.com/127.0.1.4] failed: Connection refused: connect

* Get more help at https://help.gradle.org

CONFIGURE FAILED in 33s

Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

See https://docs.gradle.org/7.3.1/userguide/command_line_interface.html#sec:command_line_warnings

鸿蒙
ServiceAbility
例程
2022-01-07 09:45:39
浏览
已于2022-1-7 15:33:11修改
收藏 0
回答 1
待解决
回答 1
按赞同
/
按时间
Wiib

与DevEco Studio无关,重装Windows 10系统就可以了。

分享
微博
QQ
微信
回复
2022-01-07 14:56:26
相关问题
使用featureAbility.getContext()时报错如下
753浏览 • 1回复 待解决
使用ohpm发布tgz文件时报错
824浏览 • 1回复 待解决
HarmonyOS 使用flutter创建packages时报错
41浏览 • 1回复 待解决
HarmonyOS 下载报错Download File Path Valid
877浏览 • 1回复 待解决
鸿蒙demo gradle报错怎么解决
9986浏览 • 4回复 待解决
如何使用gradle自动打包?
4735浏览 • 1回复 待解决
配置文件中配置权限时报错如下
1375浏览 • 1回复 待解决
HarmonyOS 运行HmosWorld时报错
240浏览 • 1回复 待解决
拉起UIAbility时报错16000050
2337浏览 • 1回复 待解决
HarmonyOS 应用发布时报错
16浏览 • 1回复 待解决
使用安装命令报错install invalid hap size
7619浏览 • 1回复 待解决
HarmonyOS 加载激励视频时报错
328浏览 • 1回复 待解决
HarmonyOS 调用相册函数时报错
40浏览 • 1回复 待解决
HarmonyOS 启动rn项目时报错
106浏览 • 1回复 待解决