【发布时间】:2019-11-06 16:22:39
【问题描述】:
我刚刚打开一台旧电脑并试图访问一些代码。在更新了我所有的 Android Studio、JDK 并下载了最新的 Gradle 之后,我在构建项目时遇到了麻烦。我收到此错误;
ERROR: Could not find com.android.tools.build:gradle:5.4.1.
Searched in the following locations:
- https://jcenter.bintray.com/com/android/tools/build/gradle/5.4.1/gradle-5.4.1.pom
- https://jcenter.bintray.com/com/android/tools/build/gradle/5.4.1/gradle-5.4.1.jar
Required by:
project :
Add Google Maven repository and sync project
Open File
我没有这个和这个
下面是build.gradle文件的内容
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:5.4.1'
}
}
下面是包装文件的内容
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
在我的设置中,我在默认和手动设置路径之间切换。我还尝试将 google() 和 MavenCentral() 添加到存储库中
我只是想构建和运行我的应用程序,但它拒绝了!哈哈帮助
【问题讨论】:
-
欢迎来到stackoverflow!请阅读How to ask 以获得您问题的最佳答案。具体来说,请改进您问题的格式并包含Minimal, Complete, and Verifiable example。
标签: android gradle android-gradle-plugin