使用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
相关问题
使用安装命令报错install invalid hap size
2997浏览 • 1回复 待解决
报错:Error while Deploying HAP
2967浏览 • 2回复 待解决
OpenHarmony如何使用request.download
398浏览 • 1回复 待解决
OLED 屏幕输出编译时报错问题
4847浏览 • 2回复 待解决
鸿蒙demo gradle报错怎么解决
5576浏览 • 4回复 待解决
如何使用gradle自动打包?
190浏览 • 1回复 待解决
使用fetch报错,fetch undefined
2205浏览 • 2回复 待解决
如何使用脚本编译生成HAP文件
2555浏览 • 1回复 待解决
Gradle怎么实现多productFlavors
2222浏览 • 1回复 待解决
SdkError: DOWNLOAD_SDK_ERROR怎么回事?
1210浏览 • 1回复 待解决
可信执行环境是什么?
3208浏览 • 1回复 已解决