Сначала убедитесь, что в ваш текущий плагин включен google ().
buildscript {
repositories {
// Gradle 4.1 and higher include support for Google's Maven repo using
// the google() method. And you need to include this repo to download
// Android Gradle plugin 3.0.0 or higher.
google()
...
}
dependencies {
classpath 'com.android.tools.build:gradle:3.4.1'
}
}
Секунда - Обновление значений в distributionURL gradle-wrapper.properties и sync
distributionUrl = https\://services.gradle.org/distributions/gradle-5.1.1-all.zip
путь можно найти по следующему пути