Execution failed for task ':launcher:checkReleaseDuplicateClasses' on 2021.3.41f1

This is the error message that appears when the build fails.

stderr[

FAILURE: Build completed with 2 failures.

1: Task failed with an exception.

  • What went wrong:
    Execution failed for task ‘:launcher:checkReleaseDuplicateClasses’.

Could not resolve all files for configuration ‘:launcher:releaseRuntimeClasspath’.
Could not find com.google.firebase:firebase-analytics-unity:12.0.0.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/com/google/firebase/firebase-analytics-unity/12.0.0/firebase-analytics-unity-12.0.0.pom
- https://repo.maven.apache.org/maven2/com/google/firebase/firebase-analytics-unity/12.0.0/firebase-analytics-unity-12.0.0.pom
-

Follow this steps to fix this issue:

  1. Download the latest Unity 2021.3.42f1
  2. Update External Dependency Manager to 1.2.182:
  3. Assets > External Dependency Manager > Android > Force Resolve Dependencies
  4. Increase Minimum API Level to 24 (EDM4U issue)
    • Player Settings > Other Settings > Minimum API Level
    • This is needed to solve ERROR:D8: com.android.tools.r8.kotlin.H
    • Google is aware of the issue and their are investigating it: unity-jar-resolver/issues/703
  5. Build
1 Like