当前位置:   article > 正文

as 正确配置gradle并运用阿里云下载源的方法_在as中gradle配置

在as中gradle配置

1.gradle-wrapper.properties

distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-all.zip

增加下载地址,然后同步。(如果下载不下来,可以提前下载,然后放到gradle相应的目录里)。

2.增加阿里云

1@  settings.gradle

  1. dependencyResolutionManagement {
  2. repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
  3. repositories {
  4. maven {
  5. allowInsecureProtocol = true
  6. url 'https://maven.aliyun.com/repository/public/' }
  7. maven {
  8. allowInsecureProtocol = true
  9. url 'https://maven.aliyun.com/repository/google/' }
  10. maven {
  11. allowInsecureProtocol = true
  12. url 'https://maven.aliyun.com/repository/central/' }
  13. maven {
  14. allowInsecureProtocol = true
  15. url 'https://maven.aliyun.com/repository/gradle-plugin/'}
  16. maven {
  17. allowInsecureProtocol
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/你好赵伟/article/detail/296380
推荐阅读
相关标签
  

闽ICP备14008679号