Could not find com.android.tools.build:gradle:7.0.3

Solution 1:

Make sure that your build.gradle file contains Google's Maven repository:

buildscript {
  repositories {
    mavenCentral()
    maven {
      url 'https://maven.google.com/'
      name 'Google'
    }
  }

  dependencies {
    classpath 'com.android.tools.build:gradle:7.0.3'
  }
}

allprojects {
  repositories {
    mavenCentral()
    maven {
      url 'https://maven.google.com/'
      name 'Google'
    }
  }

  ...
}