Search Issue Tracker

Fix In Review for 2022.1.X

Fixed in 2019.4.X, 2020.3.X

Fix In Review for 2021.3.X

Votes

32

Found in

2020.3

2021.1

2021.2

2021.2.0b16

2022.1

Issue ID

1373388

Regression

No

[Android] "Found plugins with same names" error is thrown when building on Android with duplicate .dll files

Mono

-

How to reproduce:
1. Open the user's attached "UnityNugetBugTest.zip" project
2. Build the project on Android Platform

Expected results: The project is built successfully
Actual results: "Found plugins with same names" Error is thrown for "Microsoft.Extensions.Logging.dll", "Microsoft.Bcl.AsyncInterfaces.dll", and "/Microsoft.Extensions.DependencyInjection.dll" files, the build fails

Reproducible with: 2020.3.21f1, 2021.1.26f1, 2021.2.0b16, 2022.1.0a12
Could not test with: 2019.4.31f1 and earlier because of the CS1061, CS0117 errors

Note:
- The issue is only reproducible when building on an Android platform
- The issue is reproducible with both Mono and IL2CPP Scripting Backend
- The issue seems to have started appearing with Microsoft Extensions Logging package version 3.0.0

  1. Response avatar

    Resolution Note (fix version 2020.3):

    Fixed in Unity 2020.3.34f1

  2. Response avatar

    Resolution Note (fix version 2019.4):

    Fixed in Unity 2019.4.39f1

Comments (3)

  1. Dfea5ea777a06cc37868decfa0a9d256?d=mm

    ComradeVanti

    May 02, 2022 09:31

    I can confirm this error in 2021.2.13f1

  2. 6ca03a26ad5213a5c4b33101622fd5a0?d=mm

    frankslater

    Feb 12, 2022 11:00

    Pointed here by Unity QA, because the root issue behind this may be failing Android build for projects pointing to excluded files.
    Information from my report:

    How to reproduce:
    1. Import Path Painter II (current version 2.1.3)
    2. Build for Android

    Expected results: The project is built successfully
    Actual results: "Found plugins with same names" Error is thrown for files excluded from build or the current environment.

    Reproducible with:
    Probably all currently supported Unity versions are affected. Tested and reproduced with
    2021.2.9f1
    2020.3.27f1 (LTS)
    2019.4.35f1 (LTS)
    2018.4.36f1 (LTS)

    More info:
    Only experienced this building for Android and the cause seems to be that the build includes excluded files in this check. For example, compatibility assemblies (that are constrained to specific Unity versions and environments), but this happens even with Editor only files that supposed to be completely excluded from the build (e.g. under an "Editor" folder).

    This only happens when building for Android, so inconsistent behaviour platform to platform regarding a common behaviour. If things like this can happen in Unity, that now becomes a testing nightmare, because now we have to test a lot more things

    [Unity versions] x [Platforms] x [RP versions] x [.Net versions] times.

    That number quickly runs into the three figures and results in weeks of testing before even the smallest update release.

    For example, in our case an asset was built and tested on different platforms earlier. Later the compatibility system was updated to a much better one. It was build-tested, but it was not build tested on all platforms, since general file exclusion from build was not thought to be platform specific. Users now found out the hard way that Android build gets hung up on files that otherwise don't exist in the runtime environment.

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.