How to update Gradle plugin in Android Studio
Asked Answered
I

2

16

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

Intercontinental answered 10/5, 2020 at 22:28 Comment(1)
Does this answer your question? How to update gradle in android studio?Reluctance
L
13

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

Lavelle answered 10/5, 2020 at 23:31 Comment(5)
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....Intercontinental
Are you sure you follwed the instructions correctly? It has not changed since the early days of Android StudioLavelle
sure thing mate - attached to the question. Thanks - AS is all a bit new to me.Intercontinental
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.Intercontinental
I ran into this same error trying to use the Build -> "Generate Signed Bundle / APK" tool in Android Studio. For anybody running into this error trying to sign a Flutter app for the Google Play Store, the official Flutter directions actually mention using a command-line tool here: docs.flutter.dev/deployment/android#create-an-upload-keystore They suggest using a command-line tool called keytoolKoball
L
2

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.

Loverly answered 25/11, 2020 at 17:22 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.