13

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

Rich
  • 970
  • 2
  • 16
  • 42
  • Does this answer your question? [How to update gradle in android studio?](https://stackoverflow.com/questions/17727645/how-to-update-gradle-in-android-studio) – Mahozad Jan 23 '22 at 15:29

2 Answers2

11

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

Ajeeli
  • 325
  • 1
  • 3
  • 16
  • 2
    I don't have that option. Under "Project" I only have: Project name | Project SDK | Project Language Level | Project compiler output. There's no mention of Gradle anywhere.... – Rich May 11 '20 at 10:36
  • Are you sure you follwed the instructions correctly? It has not changed since the early days of Android Studio – Ajeeli May 11 '20 at 10:44
  • sure thing mate - attached to the question. Thanks - AS is all a bit new to me. – Rich May 11 '20 at 10:53
  • thanks, unfortunately this also isn't possible as I don't have a Gradle Scripts folder. I am exporting from Expo using "expo build:android", importing this into Android studio and then the structure I get is as per the screenshot. I've tried re-downloading Android Studio (3.6.3) but it's still saying I need 3.2 or higher. – Rich May 16 '20 at 13:36
1

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.