Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to update gradle in android studio?

I installed Android Studio 0.1.9. Today I got and update to version 0.2 and of course I updated. After the installation I restarted Android Studio but now I get this message:

Project is using an old version of the Android Gradle plug-in. The minimum supported version is 0.5.0. Please update the version of the dependency 'com.android.tools.build:gradle'

How do I do that? I can't find any update tools for the gradle plugin in android studio.

like image 867
7heViking Avatar asked Jul 18 '13 15:07

7heViking


People also ask

How do I update my Gradle wrapper?

Upgrading the Gradle Wrapper One way to upgrade the Gradle version is manually change the distributionUrl property in the Wrapper's gradle-wrapper. properties file. The better and recommended option is to run the wrapper task and provide the target Gradle version as described in Adding the Gradle Wrapper.

What version of Gradle should I use with Android Studio?

For the best performance, you should use the latest possible version of both Gradle and the plugin. When you update Android Studio, you may receive a prompt to automatically update the Android Gradle plugin to the latest available version. You can choose to accept the update or manually specify a version based on your project’s build requirements.

How do I update the Android Gradle plugin?

Update the Android Gradle plugin. When you update Android Studio, you may receive a prompt to automatically update the Android Gradle plugin to the latest available version. You can choose to accept the update or manually specify a version based on your project's build requirements.

How to change the default Gradle url in Android Studio?

In File > Settings > Build, Execution, Deployment > Build Tools > Gradle : Under 'Project-level settings' section, there are 2 options: Note that option 2 will require you to download each gradle version update. Try this: - change this url according to latest version in gradle-wrapper.properties and then change gradle.

How to generate signed bundle from Android Gradle plugin?

Generating signed Bundle requires you to update the Android Gradle plugin to version x.y.z or higher As and when you update the Android Studio, it will prompt to automatically update the Android Gradle plugin to the latest available version. Accordingly you can get update. And use default Gradle wrapper option.


1 Answers

Step 1 (Use default gradle wrapper)

FileSettingsBuild, Execution, DeploymentBuild Tools→GradleUse default Gradle wrapper (recommended)

Android studio settings Gradle Wrapper

Changing to Gradle Wrapper in the new version of Android Studio: Android Studio Setting Gradle Wrapper new version

Step 2 (Select desired gradle version)

FileProject StructureProject

Android Studio project structure

The following table shows compatibility between Android plugin for Gradle and Gradle:

Compatibility table

Latest stable versions you can use with Android Studio 4.1.2 (March 2021):

Android Gradle Plugin version: 4.1.2 Gradle version: 6.5 

Official links

  • Version Compatibility
  • Migrate to Android Plugin for Gradle 3.0.0
  • Find out the latest version of Gradle
  • Info about the Gradle Wrapper
like image 88
vovahost Avatar answered Oct 13 '22 00:10

vovahost