Android Studio Gradle Plugin Upgrade

Description

We have seen occasional reports from users about issues building Android Apps using the Cordova CLI. In many cases this was due to an incompatible version of Gradle being installed.

This topic address this issue.

Discussion

If you open a Cordova Android App in Android Studio, you may see a notice indicating that the Android Gradle plugin can be upgraded.

Android Studio Gradle upgrade notice
Android Studio Gradle upgrade notice

In most cases, you will be better off NOT doing this upgrade because it can break the build. You can either ignore the notice and close it or click on the upgraded link and select the Don't remind me again for this project button.

Android Gradle Plugin Upgrade Assistant
Android Gradle Plugin Upgrade Assistant

The Cordova CLI builds the project with the version of Gradle that was installed on the computer from gradle.org

If you inadvertently updated the Gradle plugin and broke the build process in Android Studio, you can regenerate the Android project in the Cordova App Builder Genie and re-open the project in Android Studio. Just be sure NOT to upgrade the Android Gradle plugin.