How to update Gradle plugin in Android Studio

Viewed 11616

Inside Android Studio I'm getting the error:

Generating signed Bundle requires you
to update the Android Gradle plugin
to version 3.2.0 or higher

If I click "Close this dialog and update the plugin" it goes to another prompt asking whether to update. Clicking "Update" appears to do nothing except close the prompt.

All other similar issues and advice are from a few years ago and the latest version of AndroidStudio has a different interface and have not helped in this situation.

I am running:

  • Android Studio 3.6.3
  • Gradle 6.4

UPDATE: Below is a requested screenshot of the AndroidStudio UI for setting up project structure:

enter image description here

2 Answers

In Android Studio do the following:

1. File -> project structure

2. Select "project" from the left hand side.

3. On the right hand side under "Android Gradle Plugin Version" use the drop-down menu to select the Gradle plugin version you desire.

4. Press "Apply" and then "Ok"

If for some reason you could not do that, you can try:

1. Under "Gradle Scripts" choose "build.gradle(project: ... )".

enter image description here

2. From the right hand side under "dependencies" change the build gradle version to the required or latest one on this line:

enter image description here

3. Do not forget to sync on the top right hand side

enter image description here

In my case I was having the same issue when I after installing it opened Android Studio and tried to Profile or Debug APK. For me the issue was solved when I created a new (empty) project. Then the Android Gradle Plugin updated itself.

Related