You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
584 B
23 lines
584 B
|
8 months ago
|
|
||
|
|
|
||
|
|
本地最好是需要删除 Gradle 缓存才能重新构建项目。以下是删除 Gradle 缓存的步骤
|
||
|
|
|
||
|
|
# 1. 停止所有 Gradle 进程
|
||
|
|
./gradlew --stop
|
||
|
|
|
||
|
|
# 2. 删除缓存目录(确保路径正确)
|
||
|
|
rm -rf /Users/wandong/.gradle/caches/
|
||
|
|
|
||
|
|
# 3. 删除本地配置缓存(如果存在)
|
||
|
|
rm -rf .gradle/configuration-cache/
|
||
|
|
|
||
|
|
# 4. 清理项目构建文件(可选)
|
||
|
|
rm -rf build/ .gradle/
|
||
|
|
|
||
|
|
# 5. 使用禁用配置缓存的方式重新构建
|
||
|
|
./gradlew build --no-configuration-cache
|
||
|
|
|
||
|
|
|
||
|
|
总结:
|
||
|
|
第5步构建的时候最好使用魔法上网(VPN)来解决一些构建的问题
|