Could Not Find Com. Android. Tools. Build: Gradle:7.0.3
I Have a Project and I Have the Apk, but I Have Changed a Value in the Calculate. Java File and I Want to Rebuild the Project. but the Following Error Appears...
I have a project and I have the apk, but I have changed a value in the calculate.java file and I want to rebuild the project. But the following error appears. What should I do? I am not an android studio developer and I am only a novice. " Could not find com.android.tools.build:gradle:7.0.3. Searched in the following locations:
- Required by: project : Add google Maven repository and sync project Open File "
2 Answers
Make sure that your build.gradle file contains Google's Maven repository:
buildscript {
repositories {
mavenCentral()
maven {
url '
name 'Google'
}
}
dependencies {
classpath 'com.android.tools.build:gradle:7.0.3'
}
}
allprojects {
repositories {
mavenCentral()
maven {
url '
name 'Google'
}
}
...
}
Just Add mavenCentral() to build.gradle