Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Xamarin.Android.build.Tasks]
<CheckDuplicateJavaLibraries/>
ignore…
…s `repackaged.jar` (#8664) Context: https://maven.google.com/androidx/emoji2/emoji2/1.4.0/emoji2-1.4.0.aar Context: https://maven.google.com/androidx/health/connect/connect-client/1.1.0-alpha07/connect-client-1.1.0-alpha07.aar When using the two AARs linked above, you get the build error: Xamarin.Android.Common.targets(845,3): error XA1014: JAR library references with identical file names but different contents were found: repackaged.jar. Please remove any conflicting libraries from EmbeddedJar, InputJar and AndroidJavaLibrary. They both contain `libs/repackaged.jar`, which I'm not able to find any information about. I can reproduce this problem in an MSBuild test. Unfortunately, the only way to workaround the error message is to: * Unzip the `.aar` * Rename `libs/repackaged.jar` to `libs/repackaged-emoji2-1.4.0.jar`, for example * Re-zip the `.aar` a9ca3d4 had a similar problem with `r-classes.jar`. Let's expand upon this change by introducing a private item group: <ItemGroup> <_AndroidExcludedDuplicateJavaLibraries Include="classes.jar" /> <_AndroidExcludedDuplicateJavaLibraries Include="r-classes.jar" /> <_AndroidExcludedDuplicateJavaLibraries Include="repackaged.jar" /> </ItemGroup> So if this occurs in the future, we can add future files to this list without rebuilding the Android workload.
- Loading branch information