Commit 4cdf1e0
committed
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 77ac82a commit 4cdf1e0
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 | |
|---|---|---|---|
| |||
780 | 780 | | |
781 | 781 | | |
782 | 782 | | |
783 | | - | |
| 783 | + | |
784 | 784 | | |
785 | 785 | | |
786 | | - | |
| 786 | + | |
787 | 787 | | |
788 | 788 | | |
789 | 789 | | |
790 | 790 | | |
791 | 791 | | |
792 | 792 | | |
| 793 | + | |
793 | 794 | | |
794 | 795 | | |
795 | | - | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
| 801 | + | |
796 | 802 | | |
797 | 803 | | |
798 | 804 | | |
799 | 805 | | |
800 | 806 | | |
801 | 807 | | |
| 808 | + | |
802 | 809 | | |
803 | 810 | | |
804 | | - | |
| 811 | + | |
| 812 | + | |
| 813 | + | |
| 814 | + | |
| 815 | + | |
| 816 | + | |
805 | 817 | | |
806 | 818 | | |
807 | | - | |
| 819 | + | |
| 820 | + | |
| 821 | + | |
808 | 822 | | |
809 | 823 | | |
810 | 824 | | |
| |||
Lines changed: 8 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
882 | 882 | | |
883 | 883 | | |
884 | 884 | | |
| 885 | + | |
| 886 | + | |
| 887 | + | |
| 888 | + | |
| 889 | + | |
885 | 890 | | |
886 | 891 | | |
887 | 892 | | |
888 | | - | |
| 893 | + | |
| 894 | + | |
| 895 | + | |
889 | 896 | | |
890 | 897 | | |
891 | 898 | | |
| |||
0 commit comments