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

  1. 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.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.