Android 2D Textures Overrides
Gradle troubleshooting

Gradle for Android

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.

Building with Gradle for Android

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.

Gradle build settings
Gradle build settings

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.

Android 2D Textures Overrides
Gradle troubleshooting