使用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
相关问题
使用ohpm发布tgz文件时报错
696浏览 • 1回复 待解决
使用featureAbility.getContext()时报错如下
528浏览 • 1回复 待解决
HarmonyOS 下载报错Download File Path Valid
662浏览 • 1回复 待解决
鸿蒙demo gradle报错怎么解决
9895浏览 • 4回复 待解决
配置文件中配置权限时报错如下
1099浏览 • 1回复 待解决
拉起UIAbility时报错16000050
2158浏览 • 1回复 待解决
HarmonyOS 运行HmosWorld时报错
109浏览 • 1回复 待解决
使用安装命令报错install invalid hap size
7499浏览 • 1回复 待解决
如何使用gradle自动打包?
4603浏览 • 1回复 待解决
HarmonyOS 加载激励视频时报错
172浏览 • 1回复 待解决
HarmonyOS asset运行add方法时报错
178浏览 • 1回复 待解决
HarmonyOS 获取推送token时报错1000900010
101浏览 • 1回复 待解决
OLED 屏幕输出编译时报错问题
10560浏览 • 2回复 待解决
执行 npm run codegen 报错
63浏览 • 1回复 待解决
报错:Error while Deploying HAP
12291浏览 • 2回复 待解决