Gradle is an Android build system which automates a number of build processes. This automation means that many common build errors are less likely to occur. Most notably in Unity, it reduces the method reference count in the DEX files, meaning that you are less likely to come across DEX limit problems. However, Gradle works differently to the default Unity Android build system, and some existing projects may be hard to convert to Gradle.
To learn more, see Gradle’s resources on Getting Started with Gradle for Android Build.
To build your Android build with Gradle in Unity, open Build Settings (File > Build Settings) and in the Platform list, select Android. Set the Build System drop-down to Gradle (new) then click Build.
See documentation on Build Settings for more information about general build options.
If an error occurs during building for Android using Gradle, an error window appears. Click Troubleshoot to open documentation on Gradle troubleshooting in your system’s default browser.