Symptoms
- My Android builds are failing and I'm not sure why
- My Android builds are failing and other targets are building correctly
- My Android builds are failing in UBA but work locally
Cause
Unity Build Automation runs the Editor in batchmode to execute your builds and uses the default Android tools (JDK/SDK) to complete them. When your Android build is failing in the service but working locally or other targets seem to be working correctly, the root cause is often incompatible Android tools.
Failures due to Android tools will often have the message: "Gradle Build failed" in the logs. Gradle is the build system used by Unity for Android builds.
Resolution
The first step is to ensure you can build your project locally in batch mode using the same version of the Unity Editor, the JDK (the default version that ships with the chosen version of the Editor), and the Android SDK (either the default version or as specified in your advanced target configuration). You should also validate the version of Gradle you are using.
If your project does build locally, take note of the versions of the tools used and ensure they match with the versions you are using in the Unity Build Automation service. To check your local version of Gradle you can use the command "gradle --version" in the terminal.
If your build works locally in batchmode with the same tools and versions you are attempting to use with the Unity Build Automation service but continues to fail in the service, please open a support ticket so our team can investigate further.
More Information
Comments
0 comments
Article is closed for comments.