使用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
相关问题
拉起UIAbility时报错16000050
116浏览 • 1回复 待解决
使用安装命令报错install invalid hap size
5561浏览 • 1回复 待解决
鸿蒙demo gradle报错怎么解决
8302浏览 • 4回复 待解决
如何使用gradle自动打包?
2842浏览 • 1回复 待解决
OLED 屏幕输出编译时报错问题
8389浏览 • 2回复 待解决
报错:Error while Deploying HAP
9723浏览 • 2回复 待解决
webview打开地址时报错 怎么回事啊?
3551浏览 • 1回复 待解决
ForEach真机上无法执行
139浏览 • 1回复 待解决