Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to update Gradle plugin in Android Studio

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

like image 933
Rich Avatar asked May 10 '20 22:05

Rich


People also ask

How do I update my Android plugins?

Updating the IDE and plugin Android Studio should have prompted you to update to 3.0, if not then go to 'Check for updates' in the menu to do so. Once you launch your project in 3.0 for the first time, you will be told there is a new version of the plugin to update to.

What is Android gradle plugin?

The Android Gradle plugin (AGP) is the official build system for Android applications. It includes support for compiling many different types of sources and linking them together into an application that you can run on a physical Android device or an emulator.

How do I check gradle updates?

Go to Android Studio -> Preferences -> Plugins (for Mac) and File -> Settings -> Plugins (for windows) and search “Check for Dependency updates plugin”. Install it and restart android studio. You will be able to see Dependencies tab on the right which will show if any dependency has a new update available.

What is the latest gradle version?

0 (May 2022) Android Gradle plugin 7.2. 0 is a major release that includes a variety of new features and improvements.


1 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

like image 147
Ajeeli Avatar answered Oct 17 '22 22:10

Ajeeli