Step 1: From the left panel in your IDE, choose the android
folder (also known as the “Project” view).
Step 2: Look for the build.gradle
file (the one inside the app
module) then double-click it to start editing it.
Step 3: Inside the build.gradle
file, locate the classpath
line that states:
classpath 'com.android.tools.build:gradle:3.2.1'
Change the version to the desired version of the Android Gradle Plugin that is compatible with your Android Studio. For example, if you want to update it to version 3.3.0, modify it to:
classpath 'com.android.tools.build:gradle:3.3.0'
Step 4: After finishing Steps 1 to 3, go to the gradle
folder in the root directory of your project.
5: Double-click on the wrapper
subfolder.
Step 6: Click on the gradle-wrapper.properties
file to start editing it.
Step 7: In the gradle-wrapper.properties
file, make sure that your Gradle version is compatible with the Android Gradle Plugin version you specified in Step 3. You can do this by checking and updating the distributionUrl
line to the desired version.
For example:
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-all.zip