我在Android Studio的Gradle构建期间遇到了这个错误,但我无法确定自己缺少了什么。 错误:找不到com.android.tools.build:gradle:2.3.3。在以下位置搜索:
file:/C:/Program Files/Android/Android Studio/gradle/m2repository/com/android/tools/build/gradle/2.3.3/gradle-2.3.3.pom
file:/C:/Program Files/Android/Android Studio/gradle/m2repository/com/android/tools/build/gradle/2.3.3/gradle-2.3.3.jar
https://maven.google.com/com/android/tools/build/gradle/2.3.3/gradle-2.3.3.pom
https://maven.google.com/com/android/tools/build/gradle/2.3.3/gradle-2.3.3.jar
这是我的
build.gradle
文件配置。`
all sub-projects/modules.
allprojects {
repositories {
jcenter()
maven {
url "https://maven.google.com"
}
maven {
url 'https://jitpack.io'
}
}
}
buildscript {
dependencies {
classpath 'com.android.tools.build:gradle:2.3.3'
}
repositories {
maven {
url 'https://maven.google.com/'
name 'Google'
}
}
}
ext {
supportlib_version = '26.0.2'
gps_version = '11.2.0'
}
//Ensure that all dependencies use the same version of the Android Support library
subprojects {
project.configurations.all {
resolutionStrategy.eachDependency { details ->
if (details.requested.group == 'com.android.support'
&& !details.requested.name.contains('multidex')) {
details.useVersion "$supportlib_version"
}
if (details.requested.group == 'com.google.android.gms'
&& !details.requested.name.contains('multidex')) {
details.useVersion "$gps_version"
}
}
}
}
allprojects {
repositories {
jcenter()
maven {
url 'https://maven.google.com/'
name 'Google'
}
}
}
`
你能帮我看看我缺了什么吗?