Closed hyf940760301 closed 8 months ago
还是因为gradle下载文件太慢 我建议你像我一样: 1、下载自己的gradle8.x版本 2、配置gradle环境变量:GRADLE_HOME、GRADLE_USER_HOME 3、在gradle根目录下的init.d文件中,创建init.gradle init.gradle内容 allprojects{ repositories{ mavenLocal() maven {name "jcenter" ; url 'https://maven.aliyun.com/repository/jcenter' } maven {name "google" ; url 'https://maven.aliyun.com/repository/google' } maven {name "central" ; url "https://maven.aliyun.com/repository/central"} maven {name "public" ; url "https://maven.aliyun.com/repository/public"} maven {name "gradle-plugin" ; url "https://maven.aliyun.com/repository/gradle-plugin"} maven {name "apache-snapshots" ; url "https://maven.aliyun.com/repository/apache-snapshots"} maven {name "Bstek" ; url "https://nexus.bsdn.org/content/groups/public/"} mavenCentral() }
buildscript{
repositories{
maven {name "jcenter" ; url 'https://maven.aliyun.com/repository/jcenter' }
maven {name "google" ; url 'https://maven.aliyun.com/repository/google' }
maven {name "central" ; url "https://maven.aliyun.com/repository/central"}
maven {name "public" ; url "https://maven.aliyun.com/repository/public"}
maven {name "gradle-plugin" ; url "https://maven.aliyun.com/repository/gradle-plugin"}
maven {name "apache-snapshots" ; url "https://maven.aliyun.com/repository/apache-snapshots"}
maven {name "Bstek" ; url "https://nexus.bsdn.org/content/groups/public/"}
maven {name "M2" ; url "https://plugins.gradle.org/m2/"}
}
}
}
gradle不需要手动下载(上面的截图也表示gradle已经在正常运行了),我看了下文档,目前jcenter已经过期,需要替换mavenCentral,见文档刚刚的修改
直接去阿里maven仓库手动下载下来,自己放到指定的本地目录就好了。https://developer.aliyun.com/mvn/search
下载自己的gradle比较好,这样%GRADLE_HOME%/init.d/init.gradle中的远程镜像可以使用,还可以有自己的本地的gradle缓存仓库,但是maven { url 'https://maven.aliyun.com/repository/jcenter' }这个已经不能用了
gradle的版本是随项目走动的(不同版本的rn会使用不同版本的gradle,手动改变这个版本可能带来很多问题),而gradle目前官方的cdn在国内并没有啥障碍,所以下载下来没有啥意义
👋 Hey there, it looks like there has been no activity on this issue in the last 90 days. Has the issue been fixed, or does it still require the community attention? This issue will be closed in the next 7 days if no further activity occurs. Thank you for your contributions.
Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information.
请按以下格式提供问题的相关信息。
问题的具体描述
请描述完整的环境/版本信息
当前的环境: node:16.16.0