Search Issue Tracker
Third Party Issue
Votes
0
Found in
2021.3.35f1
2022.3.19f1
2023.2.9f1
2023.3.0b5
Issue ID
UUM-62805
Regression
No
[Android] Build fails with "Execution failed for task ':launcher:checkReleaseAarMetadata'“ and “Execution failed for task ':unityLibrary:generateReleaseRFile'“ when building with a custom mainTemplate.gradle file for Android
Reproduction steps:
1. Open the attached project "ReproProj"
2. Open the “/Assets/Scenes/Game.unity” Scene
3. Switch to Android Platform (File > Build Settings > Android > Switch Platform)
4. Build (File > Build Settings > Build)
Expected result: Build succeeds
Actual result: Build fails with “Execution failed for task ':launcher:checkReleaseAarMetadata'“ and “Execution failed for task ':unityLibrary:generateReleaseRFile'“ Errors
Reproducible with: 2021.3.35f1, 2022.3.19f1, 2023.2.9f1, 2023.3.0b5
Testing environment: Windows 10 Enterprise 21H2
Not reproducible on: No other environment tested
Notes:
- Reproduces with Mono and IL2CPP
- Reproduces with Vulkan and OpenGLES3
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Mono Windows Builds don't produce full log callstacks when generating logs
- AssetBundles fail to load when running in Built Players for Mobile Devices
- UI elements with text gets bigger and grey when Player window is moved to another screen with different resolution
- System name accepts multiline text but crops it on confirmation, duplicates input, and shrinks the field when empty
- UI element scale and position are wrong in project build when DRS is changed with HDR and Software Dynamic Resolution enabled
Resolution Note:
You're using outdated Google external dependency manager.
Please update it:
* Delete MobileDependencyResolver folder from your project
* Go to https://github.com/googlesamples/unity-jar-resolver
* And download https://github.com/googlesamples/unity-jar-resolver/blob/master/external-dependency-manager-1.2.178.unitypackage
* Import this package to your Unity project
* Once done, Assets->External Dependency Manager->Android Resolver->Force Resolve
* Build
The build should succeed now.
Note: This is not an issue with Unity, your gradle dependencies were incorrectly setup.