You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix duplicate class errors for runtime-annotation-jvm and datastore-preferences-core-jvm (#1371)
Fixes: #1341
Exclude JVM variant packages as runtime dependencies from their parent
no-bindings packages to prevent duplicate class errors (JAVA0000) when
R8/D8 code shrinker is enabled in Android/MAUI projects.
- Xamarin.AndroidX.Compose.Runtime.Annotation (1.10.3.1): exclude
androidx.compose.runtime.runtime-annotation-jvm as runtime dependency
- Xamarin.AndroidX.DataStore.Preferences.Core (1.2.0.2): exclude
androidx.datastore.datastore-preferences-core-jvm as runtime dependency
The Maven POMs declare the JVM variant as a compile-scope dependency of
the parent artifact. The binderator was converting this into a NuGet
PackageReference, causing both the Android (.aar) and JVM (.jar) variants
to be included simultaneously, leading to:
'Type androidx.compose.runtime.Immutable is defined multiple times'
'Type androidx.compose.runtime.StableMarker is defined multiple times'
'Type androidx.datastore.preferences.core.AtomicBoolean is defined multiple times'
0 commit comments