Android Studio 3.2 - Could not find com.android.tools.build:aapt2:3.2.0-4818971

Most likely you do not have the Google repository in your project's build.gradle file. Add google() in BOTH locations as shown below:

buildscript {

    repositories {
        google()
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.2.0'
    }
}

allprojects {
    repositories {
        google()
        jcenter()
    }
}

I was able to solve the issue by adding google() in both locations:

File -> Project Structure -> Project -> *Now add ", google()" in

Android Plugin Repository

and

Default Library Repository

*


When you upgrade to 4.6 version of gradle. You need following upgrades too. Gradle Plugin Release page.

1. Android Studio 3.+

You need Android Studio version 3.+ to have 4.6 version of gradle. At the time of post latest release was 3.2.1. You can see latest release on this page.

2. Gradle Plugin 3.1.+

You need 3.1.+ gradle plugin for gradle-4.6 support. Check in project level build.gradle.

classpath 'com.android.tools.build:gradle:3.2.1'

At the time of post latest version was 3.2.1. You can see latest release here.

3. Add Google Maven Library

You need to add Google Maven library to project level build.gradle like below code.

buildscript {
    repositories {
        google()
        ...
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.2.1'
        ...
    }
}

allprojects {
    repositories {
        google()
        ...
    }
}