5 changed files with 39 additions and 7 deletions
@ -1,6 +0,0 @@ |
|||
val location: String? = connection.getHeaderField("Location") |
|||
if (location == null) { |
|||
// 处理 Location 为 null 的情况,例如抛出异常或返回默认值 |
|||
throw IOException("Location header is missing in the response") |
|||
} |
|||
// 原有逻辑 |
|||
@ -0,0 +1,22 @@ |
|||
|
|||
|
|||
本地最好是需要删除 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)来解决一些构建的问题 |
|||
Loading…
Reference in new issue