Every time you update Android Studio, you will be prompted to update gradle version. Note the following:
1. Update gradle configuration files in your project directory: build.gradle and gradle-wrapper.properties.
Android Gradle Plugin Version 4.0.0 and Gradle Version 6.1.1
Dependencies buildscript {repositories {jcenter ()} {the classpath 'com. Android. View the build: gradle: 4.0.0' / / NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files } }Copy the code
The distributionUrl file in gradle-wrapper.properties will be placed in the root directory of the project – gradle-wrapper:
distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip
Copy the code
2. In the files-settings section, you can find the Gradle configuration. In the project level Gradle Settings, if you select Use Gradle from Specified location, you will have to check that the directory is set correctly.