Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Question A failure occured while executing com.android.build.gradle.internal.tasks.CheckDuplicatesRunnable

Discussion in 'Android' started by Muhaimenul_Nafi_Singularity, Feb 16, 2023.

  1. Muhaimenul_Nafi_Singularity

    Muhaimenul_Nafi_Singularity

    Joined:
    Jan 12, 2021
    Posts:
    2
    Hello everyone,

    I am facing this error in unity while trying to build in Android(.aab as it will be published as an update of an existing app) for Google Play Store.


    Conflict in 2022.2.6.PNG

    I am using Unity version 2022.2.6f1 and switched the project from Unity 2020.2.7f1. I have tried so many ways but failed to find out any solution.

    A flutter developer posted this issue in GitHub and someone said in reply that this might be related to native Firebase Android SDK. For more information you can check : https://github.com/firebase/flutterfire/issues/10216

    But I need a solution for unity.
     
    immerVR likes this.
  2. ernbot

    ernbot

    Joined:
    Nov 2, 2009
    Posts:
    77
    Were getting the same issue in 2022.3.2 - did you resolve it?

     
    immerVR likes this.
  3. immerVR

    immerVR

    Joined:
    Jan 23, 2020
    Posts:
    6
    In my case, I had the unity classes as lib inside an .aar file which made it duplicate with Unity's own. After removing it, it built again.
     
    Last edited: Aug 29, 2023
  4. BOOLitGameStudio

    BOOLitGameStudio

    Joined:
    May 16, 2013
    Posts:
    17
    can you be more specific on how to locate and remove these files. Using unity 2022.3.8f1 I'm unable to build an android project as soon as I add a plugin.
     
  5. immerVR

    immerVR

    Joined:
    Jan 23, 2020
    Posts:
    6
    In my case, I was renaming the .aar file to .rar and opened it with WinRAR. Other archive tools will probably work as well. In that file, I deleted the classes.jar from Unity that I put before into the Android Studio project. File size was around 129 KB (there were more than one classes.jar in other folders). After that, renaming .rar back to .aar and it worked.

    I hope that works in your case as well!