I am getting this error during gradle build in android studio. And I am unable to figure out what I am missing.
Error:Could not find com.android.tools.build:gradle:2.3.3. Searched in the
following locations:
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
Here is my build.gradle
file configuration
`
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'
}
}
}
`
Could you help me what am I missing?