gpt4 book ai didi

Android Studio 永远无法下载 fastutil-7.2.0.jar

转载 作者:行者123 更新时间:2023-12-05 00:04:46 27 4
gpt4 key购买 nike

类似问题:Android studio gradle stuck at Fastutil.7.2.0.jar

当我用 Java 构建我的第一个 Android 应用程序时,Android Studio 4.0 总是报错:

Could not GET 'https://jcenter.bintray.com/it/unimi/dsi/fastutil/7.2.0/fastutil-7.2.0.jar'. Received status code 400 from server: Bad Request
Enable Gradle 'offline mode' and sync project

但是,可以使用浏览器下载 jar

如果我在 build.gradle 中删除 jcenter(),会出现类似的错误:

Could not HEAD 'https://dl.google.com/dl/android/maven2/org/jetbrains/kotlin/kotlin-stdlib-jdk8/1.3.72/kotlin-stdlib-jdk8-1.3.72.pom'. Received status code 400 from server: Bad Request
Enable Gradle 'offline mode' and sync project

这个文件根本不存在。

我尝试修改 build.gradle 或设置代理,但均无效。

gradle.build 文件:

// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath "com.android.tools.build:gradle:4.0.0"

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}

allprojects {
repositories {
google()
jcenter()
}
}

task clean(type: Delete) {
delete rootProject.buildDir
}

更新:

已解决。代理的错。检查 C:\Users\USERNAME\.gradle\gradle.properties

最佳答案

确保你已经安装了命令行工具

如果不是从安装sdk manager > sdk tools > 检查命令行工具并应用

关于Android Studio 永远无法下载 fastutil-7.2.0.jar,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62241209/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com