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 "
9

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' } } ... } 
1

Just Add mavenCentral() to build.gradle

1

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy