Commit 2cbb5c9
authored
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.
1 parent 2b2c6eb commit 2cbb5c9
File tree
3 files changed
+28
-11
lines changed- src/Xamarin.Android.Build.Tasks
- Tasks
- Tests/Xamarin.Android.Build.Tests
3 files changed
+28
-11
lines changedLines changed: 1 addition & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | 12 | | |
18 | 13 | | |
19 | 14 | | |
20 | 15 | | |
21 | 16 | | |
| 17 | + | |
22 | 18 | | |
23 | 19 | | |
24 | 20 | | |
| |||
Lines changed: 19 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
722 | 722 | | |
723 | 723 | | |
724 | 724 | | |
725 | | - | |
| 725 | + | |
726 | 726 | | |
727 | 727 | | |
728 | | - | |
| 728 | + | |
729 | 729 | | |
730 | 730 | | |
731 | 731 | | |
732 | 732 | | |
733 | 733 | | |
734 | 734 | | |
| 735 | + | |
735 | 736 | | |
736 | 737 | | |
737 | | - | |
| 738 | + | |
| 739 | + | |
| 740 | + | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
738 | 744 | | |
739 | 745 | | |
740 | 746 | | |
741 | 747 | | |
742 | 748 | | |
743 | 749 | | |
| 750 | + | |
744 | 751 | | |
745 | 752 | | |
746 | | - | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
| 758 | + | |
747 | 759 | | |
748 | 760 | | |
749 | | - | |
| 761 | + | |
| 762 | + | |
| 763 | + | |
750 | 764 | | |
751 | 765 | | |
752 | 766 | | |
| |||
Lines changed: 8 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
842 | 842 | | |
843 | 843 | | |
844 | 844 | | |
| 845 | + | |
| 846 | + | |
| 847 | + | |
| 848 | + | |
| 849 | + | |
845 | 850 | | |
846 | 851 | | |
847 | 852 | | |
848 | | - | |
| 853 | + | |
| 854 | + | |
| 855 | + | |
849 | 856 | | |
850 | 857 | | |
851 | 858 | | |
| |||
0 commit comments