Skip to content

Xamarin.AndroidX.Activity: androidx.compose.runtime.Immutable is defined multiple times #1341

Closed

Description

@leonardbarbu

Android framework version

net10.0-android (Preview)

Affected platform version

VS 2026 18.1.1, .NET 10.0.101, workload 10.0.101.1

Description

Hello,
I have updated to the current version of Xamarin.Firebase.Messaging 125.0.1.1, which adds as transitive package Xamarin.AndroidX.Activity 1.12.2.1, (...) which adds as transitive packages:

  • Xamarin.AndroidX.Compose.Runtime.Annotation.Android.1.10.0.1
  • Xamarin.AndroidX.Compose.Runtime.Annotation.Jvm.1.10.0.1

The Release build with R8 code shrinker enabled is producing the following error:
1>MSBUILD : java.exe error JAVA0000: Type androidx.compose.runtime.Immutable is defined multiple times:
xamarin.androidx.compose.runtime.annotation.android
xamarin.androidx.compose.runtime.annotation.jvm

Thanks

Steps to Reproduce

  1. New MAUI app with .NET 10
  2. Update all the packages (MAUI related)
  3. Add Xamarin.Firebase.Messaging
  4. Set in project properties -> Application -> Android Targets -> Minimum Android Target Framework -> Android 6.0 (API 23)
  5. Check (enable) in project Properties -> Android -> Options -> R8 code shrinker
Image Image Image

Did you find any workaround?

downgrade from 125.0.1.1 to 125.0.1

Relevant log output

1>MSBUILD : java.exe error JAVA0000: Error in C:\Users\LeonardBarbu\.nuget\packages\xamarin.androidx.compose.runtime.annotation.android\1.10.0.1\buildTransitive\net10.0-android36.0\..\..\aar\runtime-annotation-android.aar:classes.jar:androidx/compose/runtime/Immutable.class:
1>MSBUILD : java.exe error JAVA0000: Type androidx.compose.runtime.Immutable is defined multiple times: C:\Users\LeonardBarbu\.nuget\packages\xamarin.androidx.compose.runtime.annotation.android\1.10.0.1\buildTransitive\net10.0-android36.0\..\..\aar\runtime-annotation-android.aar:classes.jar:androidx/compose/runtime/Immutable.class, C:\Users\LeonardBarbu\.nuget\packages\xamarin.androidx.compose.runtime.annotation.jvm\1.10.0.1\buildTransitive\net10.0-android36.0\..\..\jar\runtime-annotation-jvm.jar:androidx/compose/runtime/Immutable.class
1>MSBUILD : java.exe error JAVA0000: Compilation failed

Activity

  1. changed the title [-]Xamarin.AndroidX.Activity: androidx.compose.runtime.Immutable is defined multiple time[/-] [+]Xamarin.AndroidX.Activity: androidx.compose.runtime.Immutable is defined multiple times[/+] on Jan 9, 2026
  2. tipa commented on Jan 10, 2026

    @tipa

    Same issue here can also be reproduced by adding these two dependencies:

    <PackageReference Include="Xamarin.AndroidX.Preference" Version="1.2.1.16" />
    <PackageReference Include="Xamarin.Google.Android.Material" Version="1.13.0.1" />
    

    This issue can also be reproduced in a non-MAUI app (dotnet new android)

  3. Pepsi1x1 commented on Jan 11, 2026

    @Pepsi1x1

    Worked around with the following references

      <ItemGroup Condition="'$(TargetFramework)' == 'net10.0-android'">
        <PackageReference Include="Xamarin.Firebase.Messaging" Version="125.0.1.1" />
        <PackageReference Include="Xamarin.AndroidX.Lifecycle.LiveData" Version="2.10.0.1" />
        <PackageReference Include="Xamarin.AndroidX.Fragment.Ktx" Version="1.8.9.1" />
        <PackageReference Include="Xamarin.AndroidX.Lifecycle.Common.Java8" Version="2.10.0.1" />
        <PackageReference Include="Xamarin.AndroidX.Lifecycle.Process" Version="2.10.0.1" />
        <!-- Exclude duplicate JVM packages to resolve D8 compilation conflicts with Android variants -->
        <PackageReference Include="Xamarin.AndroidX.Compose.Runtime.Annotation.Jvm" Version="1.10.0.1" ExcludeAssets="all" />
        <PackageReference Include="Xamarin.AndroidX.Datastore.Preferences.Core.Jvm" Version="1.2.0.1" ExcludeAssets="all" />
      </ItemGroup>
    
  4. markuspalme commented on Jan 12, 2026

    @markuspalme

    experiencing the same issue with a MAUI app - please let me know if additional details would help finding the issue.

  5. kerberosargos commented on Jan 16, 2026

    @kerberosargos
     <PackageReference Include="Xamarin.AndroidX.Activity.Ktx" Version="1.12.2.1" />
     <PackageReference Include="Xamarin.AndroidX.Camera.Camera2" Version="1.5.2.1" />
     <PackageReference Include="Xamarin.AndroidX.Camera.Core" Version="1.5.2.1" />
     <PackageReference Include="Xamarin.AndroidX.Camera.View" Version="1.5.2.1" />
     <PackageReference Include="Xamarin.AndroidX.Collection.Ktx" Version="1.5.0.4" />
     <PackageReference Include="Xamarin.AndroidX.Fragment.Ktx" Version="1.8.9.1" />
        <PackageReference Include="Xamarin.GooglePlayServices.MLKit.Text.Recognition" Version="119.0.1.6" />
    
    
    >Build FAILED.
    4>                   (_CompileToDalvik target) -> 
    4>                     MSBUILD : java.exe error JAVA0000: Info in obj\Debug\net10.0-android\lp\336\jl\libs\623E6E29E2058512.jar:META-INF/com.android.tools/r8/kotlinx-serialization-common.pro at line 5, column 12:
    4>                   MSBUILD : java.exe error JAVA0000: The type "<1>$*" is used in a field rule. The characters in this type are legal for the JVM, but unlikely to originate from a source language. Maybe this is not the rule you are looking for.
    4>                   MSBUILD : java.exe error JAVA0000: Error in C:\n\xamarin.androidx.compose.runtime.annotation.android\1.10.0.1\buildTransitive\net10.0-android36.0\..\..\aar\runtime-annotation-android.aar:classes.jar:androidx/compose/runtime/StableMarker.class:
    4>                   MSBUILD : java.exe error JAVA0000: Type androidx.compose.runtime.StableMarker is defined multiple times: C:\n\xamarin.androidx.compose.runtime.annotation.android\1.10.0.1\buildTransitive\net10.0-android36.0\..\..\aar\runtime-annotation-android.aar:classes.jar:androidx/compose/runtime/StableMarker.class, C:\n\xamarin.androidx.compose.runtime.annotation.jvm\1.10.0.1\buildTransitive\net10.0-android36.0\..\..\jar\runtime-annotation-jvm.jar:androidx/compose/runtime/StableMarker.class
    4>                   MSBUILD : java.exe error JAVA0000: Compilation failed
    4>                   MSBUILD : java.exe error JAVA0000: java.lang.RuntimeException: com.android.tools.r8.CompilationFailedException: Compilation failed to complete, origin: C:\n\xamarin.androidx.compose.runtime.annotation.android\1.10.0.1\buildTransitive\net10.0-android36.0\..\..\aar\runtime-annotation-android.aar:classes.jar
    4>                   MSBUILD : java.exe error JAVA0000: androidx/compose/runtime/StableMarker.class
    4>                   MSBUILD : java.exe error JAVA0000: 	at com.android.tools.r8.internal.xv.a(R8_8.11.18_94248c9a6fd57686ded562f231d18f14e8923ad1fe977e99b974a9bf901c8a48:131)
    4>                   MSBUILD : java.exe error JAVA0000: 	at com.android.tools.r8.R8.main(R8_8.11.18_94248c9a6fd57686ded562f231d18f14e8923ad1fe977e99b974a9bf901c8a48:5)
    4>                   MSBUILD : java.exe error JAVA0000: Caused by: com.android.tools.r8.CompilationFailedException: Compilation failed to complete, origin: C:\n\xamarin.androidx.compose.runtime.annotation.android\1.10.0.1\buildTransitive\net10.0-android36.0\..\..\aar\runtime-annotation-android.aar:classes.jar:androidx/compose/runtime/StableMarker.class
    4>                   MSBUILD : java.exe error JAVA0000: 	at Version.fakeStackEntry(Version_8.11.18.java:0)
    4>                   MSBUILD : java.exe error JAVA0000: 	at com.android.tools.r8.P.a(R8_8.11.18_94248c9a6fd57686ded562f231d18f14e8923ad1fe977e99b974a9bf901c8a48:1)
    4>                   MSBUILD : java.exe error JAVA0000: 	at com.android.tools.r8.internal.xv.a(R8_8.11.18_94248c9a6fd57686ded562f231d18f14e8923ad1fe977e99b974a9bf901c8a48:82)
    4>                   MSBUILD : java.exe error JAVA0000: 	at com.android.tools.r8.internal.xv.a(R8_8.11.18_94248c9a6fd57686ded562f231d18f14e8923ad1fe977e99b974a9bf901c8a48:32)
    4>                   MSBUILD : java.exe error JAVA0000: 	at com.android.tools.r8.internal.xv.a(R8_8.11.18_94248c9a6fd57686ded562f231d18f14e8923ad1fe977e99b974a9bf901c8a48:31)
    4>                   MSBUILD : java.exe error JAVA0000: 	at com.android.tools.r8.R8.b(R8_8.11.18_94248c9a6fd57686ded562f231d18f14e8923ad1fe977e99b974a9bf901c8a48:62)
    4>                   MSBUILD : java.exe error JAVA0000: 	at com.android.tools.r8.R8.a(R8_8.11.18_94248c9a6fd57686ded562f231d18f14e8923ad1fe977e99b974a9bf901c8a48:1658)
    4>                   MSBUILD : java.exe error JAVA0000: 	at com.android.tools.r8.internal.xv.a(R8_8.11.18_94248c9a6fd57686ded562f231d18f14e8923ad1fe977e99b974a9bf901c8a48:118)
    4>                   MSBUILD : java.exe error JAVA0000: 	... 1 more
    4>                   MSBUILD : java.exe error JAVA0000: Caused by: com.android.tools.r8.internal.g: Type androidx.compose.runtime.StableMarker is defined multiple times: C:\n\xamarin.androidx.compose.runtime.annotation.android\1.10.0.1\buildTransitive\net10.0-android36.0\..\..\aar\runtime-annotation-android.aar:classes.jar:androidx/compose/runtime/StableMarker.class, C:\n\xamarin.androidx.compose.runtime.annotation.jvm\1.10.0.1\buildTransitive\net10.0-android36.0\..\..\jar\runtime-annotation-jvm.jar:androidx/compose/runtime/StableMarker.class
    4>                   MSBUILD : java.exe error JAVA0000: 	at com.android.tools.r8.internal.yg0.a(R8_8.11.18_94248c9a6fd57686ded562f231d18f14e8923ad1fe977e99b974a9bf901c8a48:21)
    4>                   MSBUILD : java.exe error JAVA0000: 	at com.android.tools.r8.internal.O80.a(R8_8.11.18_94248c9a6fd57686ded562f231d18f14e8923ad1fe977e99b974a9bf901c8a48:54)
    4>                   MSBUILD : java.exe error JAVA0000: 	at com.android.tools.r8.internal.O80.a(R8_8.11.18_94248c9a6fd57686ded562f231d18f14e8923ad1fe977e99b974a9bf901c8a48:10)
    4>                   MSBUILD : java.exe error JAVA0000: 	at java.base/java.util.concurrent.ConcurrentHashMap.merge(ConcurrentHashMap.java:2056)
    4>                   MSBUILD : java.exe error JAVA0000: 	at com.android.tools.r8.internal.O80.a(R8_8.11.18_94248c9a6fd57686ded562f231d18f14e8923ad1fe977e99b974a9bf901c8a48:6)
    4>                   MSBUILD : java.exe error JAVA0000: 	at com.android.tools.r8.graph.z4$a.c(R8_8.11.18_94248c9a6fd57686ded562f231d18f14e8923ad1fe977e99b974a9bf901c8a48:6)
    4>                   MSBUILD : java.exe error JAVA0000: 	at com.android.tools.r8.dex.c.a(R8_8.11.18_94248c9a6fd57686ded562f231d18f14e8923ad1fe977e99b974a9bf901c8a48:56)
    4>                   MSBUILD : java.exe error JAVA0000: 	at com.android.tools.r8.dex.c.a(R8_8.11.18_94248c9a6fd57686ded562f231d18f14e8923ad1fe977e99b974a9bf901c8a48:12)
    4>                   MSBUILD : java.exe error JAVA0000: 	at com.android.tools.r8.R8.a(R8_8.11.18_94248c9a6fd57686ded562f231d18f14e8923ad1fe977e99b974a9bf901c8a48:33)
    4>                   MSBUILD : java.exe error JAVA0000: 	at com.android.tools.r8.R8.c(R8_8.11.18_94248c9a6fd57686ded562f231d18f14e8923ad1fe977e99b974a9bf901c8a48:8)
    4>                   MSBUILD : java.exe error JAVA0000: 	at com.android.tools.r8.R8.a(R8_8.11.18_94248c9a6fd57686ded562f231d18f14e8923ad1fe977e99b974a9bf901c8a48:1657)
    4>                   MSBUILD : java.exe error JAVA0000: 	at com.android.tools.r8.internal.xv.a(R8_8.11.18_94248c9a6fd57686ded562f231d18f14e8923ad1fe977e99b974a9bf901c8a48:28)
    4>                   MSBUILD : java.exe error JAVA0000: 	... 4 more
    4>                   MSBUILD : java.exe error JAVA0000: Directory 'obj\Debug\net10.0-android\lp\336' is from 'Xamarin.KotlinX.Serialization.Core.Jvm.aar'.
    4>
    4>    4 Warning(s)
    4>    1 Error(s)
    
  6. lesterbotello commented on Jan 18, 2026

    @lesterbotello

    In my case, I had a class library (which was actually importing the transitive packages) and my mobile project was importing the class library resulting in the error. What worked for me is adding the following in my class library project:

    <PackageReference Include="Xamarin.AndroidX.Compose.Runtime.Annotation.Jvm" Version="1.10.0.1">
        <PrivateAssets>all</PrivateAssets>
    </PackageReference>
    

    More info: https://learn.microsoft.com/en-us/nuget/consume-packages/package-references-in-project-files#controlling-dependency-assets

  7. RsZoli commented on Jan 20, 2026

    @RsZoli

    why is this problem so common for almost every version bump? :(

  8. KRA2008 commented on Jan 20, 2026

    @KRA2008
  9. dbSoft-SoftwareSolutions commented on Jan 25, 2026

    @dbSoft-SoftwareSolutions

    We have the same problem too

  10. decv86 commented on Feb 3, 2026

    @decv86

    Same problem here

  11. vpenades commented on Feb 9, 2026

    @vpenades

    Same problem

  12. RobTF commented on Feb 9, 2026

    @RobTF

    why is this problem so common for almost every version bump? :(

    It's absolutely ridiculous. We're sick to death of this stuff, you spend more time battling the tools and build process than adding business value.

  13. dotMorten commented on Feb 9, 2026

    @dotMorten

    We also have customers hitting this too, and have a hard time finding a solid fix that'll "just work" no matter what version they are targeting.

  14. dartasen commented on Feb 10, 2026

    @dartasen

    @RobTF Unfortunately that's how the ecosystem is and Microsoft will not/can't do anything about it.
    You would see similar results while using Kotlin for an Android app. Google moves around types as they wish, causing dependencies hell for the next 20 years.

    MAUI and 3rd libraries need to keep going forward to reduce the chance of this error happening, but it is what it is.

    For now the only workaround is to pin versions and/or exclude assets from specific packages.

  15. 4 remaining items

  16. tipa commented on Mar 3, 2026

    @tipa

    When is this fix expected to be published? After the latest round of Nuget updates yesterday, I still get this error:

     MSBUILD : java.exe error JAVA0000:
          Error in C:\Users\user\.nuget\packages\xamarin.androidx.compose.runtime.annotation.android\1.10.3\buildTransitive\net1
          0.0-android36.0\..\..\aar\runtime-annotation-android.aar:classes.jar:androidx/compose/runtime/Immutable.class:
          Type androidx.compose.runtime.Immutable is defined multiple times: C:\Users\user\.nuget\packages\xamarin.androidx.comp
          ose.runtime.annotation.android\1.10.3\buildTransitive\net10.0-android36.0\..\..\aar\runtime-annotation-android.aar:clas
          ses.jar:androidx/compose/runtime/Immutable.class, C:\Users\user\.nuget\packages\xamarin.androidx.compose.runtime.annot
          ation.jvm\1.10.0.1\buildTransitive\net10.0-android36.0\..\..\jar\runtime-annotation-jvm.jar:androidx/compose/runtime/Im
          mutable.class
          Compilation failed
    

    Manually adding this dependency resolves the issue (but ExcludeAssets="all" is required):

        <PackageReference Include="Xamarin.AndroidX.Compose.Runtime.Annotation.Jvm" Version="1.10.3" ExcludeAssets="all" />
    
  17. dbSoft-SoftwareSolutions commented on Mar 3, 2026

    @dbSoft-SoftwareSolutions

    We have the same problem too

  18. jonathanpeppers commented on Mar 3, 2026

    @jonathanpeppers
    Member
  19. tipa commented on Mar 3, 2026

    @tipa

    @jonathanpeppers what is the advantage of using these dependencies over of the *.jvm ones?
    Ideally, I would not have to specify any Nuget packages that I don't use directly, shouldn't they be pulled implicitly as dependencies?

  20. jonathanpeppers commented on Mar 3, 2026

    @jonathanpeppers
    Member

    If you specify Xamarin.AndroidX.Compose.Runtime.Annotation/1.10.3.1, it should prevent bringing in the duplicate *.jvm package now.

    If that works for you, let me know.

    We can do a step to add a .1 version to all packages, and you wouldn't have to list this one.

  21. tipa commented on Mar 3, 2026

    @tipa

    If I just specify Xamarin.AndroidX.Compose.Runtime.Annotation/1.10.3.1, I get this error:

    
    MSBUILD : java.exe error JAVA0000:
          Error in C:\Users\timop\.nuget\packages\xamarin.androidx.datastore.preferences.core.jvm\1.2.0.1\buildTransitive\ne
          t10.0-android36.0\..\..\jar\androidx.datastore.datastore-preferences-core-jvm.jar:androidx/datastore/preferences/c
          ore/AtomicBoolean.class:
          Type androidx.datastore.preferences.core.AtomicBoolean is defined multiple times: C:\Users\timop\.nuget\packages\x
          amarin.androidx.datastore.preferences.core.jvm\1.2.0.1\buildTransitive\net10.0-android36.0\..\..\jar\androidx.data
          store.datastore-preferences-core-jvm.jar:androidx/datastore/preferences/core/AtomicBoolean.class, obj\Release\net1
          0.0-android\lp\180\jl\classes.jar:androidx/datastore/preferences/core/AtomicBoolean.class
          Compilation failed
          java.lang.RuntimeException: com.android.tools.r8.CompilationFailedException: Compilation failed to complete, origi
          n: C:\Users\timop\.nuget\packages\xamarin.androidx.datastore.preferences.core.jvm\1.2.0.1\buildTransitive\net10.0-
          android36.0\..\..\jar\androidx.datastore.datastore-preferences-core-jvm.jar
          androidx/datastore/preferences/core/AtomicBoolean.class
            at com.android.tools.r8.internal.xv.a(R8_8.11.18_94248c9a6fd57686ded562f231d18f14e8923ad1fe977e99b974a9bf901c8a48
          :131)
            at com.android.tools.r8.R8.main(R8_8.11.18_94248c9a6fd57686ded562f231d18f14e8923ad1fe977e99b974a9bf901c8a48:5)
          Caused by: com.android.tools.r8.CompilationFailedException: Compilation failed to complete, origin: C:\Users\timop
          \.nuget\packages\xamarin.androidx.datastore.preferences.core.jvm\1.2.0.1\buildTransitive\net10.0-android36.0\..\..
          \jar\androidx.datastore.datastore-preferences-core-jvm.jar:androidx/datastore/preferences/core/AtomicBoolean.class
            at Version.fakeStackEntry(Version_8.11.18.java:0)
            at com.android.tools.r8.P.a(R8_8.11.18_94248c9a6fd57686ded562f231d18f14e8923ad1fe977e99b974a9bf901c8a48:1)
            at com.android.tools.r8.internal.xv.a(R8_8.11.18_94248c9a6fd57686ded562f231d18f14e8923ad1fe977e99b974a9bf901c8a48
          :82)
            at com.android.tools.r8.internal.xv.a(R8_8.11.18_94248c9a6fd57686ded562f231d18f14e8923ad1fe977e99b974a9bf901c8a48
          :32)
            at com.android.tools.r8.internal.xv.a(R8_8.11.18_94248c9a6fd57686ded562f231d18f14e8923ad1fe977e99b974a9bf901c8a48
          :31)
            at com.android.tools.r8.R8.b(R8_8.11.18_94248c9a6fd57686ded562f231d18f14e8923ad1fe977e99b974a9bf901c8a48:62)
            at com.android.tools.r8.R8.a(R8_8.11.18_94248c9a6fd57686ded562f231d18f14e8923ad1fe977e99b974a9bf901c8a48:1658)
            at com.android.tools.r8.internal.xv.a(R8_8.11.18_94248c9a6fd57686ded562f231d18f14e8923ad1fe977e99b974a9bf901c8a48
          :118)
            ... 1 more
          Caused by: com.android.tools.r8.internal.g: Type androidx.datastore.preferences.core.AtomicBoolean is defined mult
          iple times: C:\Users\timop\.nuget\packages\xamarin.androidx.datastore.preferences.core.jvm\1.2.0.1\buildTransitive
          \net10.0-android36.0\..\..\jar\androidx.datastore.datastore-preferences-core-jvm.jar:androidx/datastore/preference
          s/core/AtomicBoolean.class, obj\Release\net10.0-android\lp\180\jl\classes.jar:androidx/datastore/preferences/core/
          AtomicBoolean.class
            at com.android.tools.r8.internal.yg0.a(R8_8.11.18_94248c9a6fd57686ded562f231d18f14e8923ad1fe977e99b974a9bf901c8a4
          8:21)
            at com.android.tools.r8.internal.O80.a(R8_8.11.18_94248c9a6fd57686ded562f231d18f14e8923ad1fe977e99b974a9bf901c8a4
          8:54)
            at com.android.tools.r8.internal.O80.a(R8_8.11.18_94248c9a6fd57686ded562f231d18f14e8923ad1fe977e99b974a9bf901c8a4
          8:10)
            at java.base/java.util.concurrent.ConcurrentHashMap.merge(ConcurrentHashMap.java:2056)
            at com.android.tools.r8.internal.O80.a(R8_8.11.18_94248c9a6fd57686ded562f231d18f14e8923ad1fe977e99b974a9bf901c8a4
          8:6)
            at com.android.tools.r8.graph.z4$a.c(R8_8.11.18_94248c9a6fd57686ded562f231d18f14e8923ad1fe977e99b974a9bf901c8a48:
          6)
            at com.android.tools.r8.dex.c.a(R8_8.11.18_94248c9a6fd57686ded562f231d18f14e8923ad1fe977e99b974a9bf901c8a48:56)
            at com.android.tools.r8.dex.c.a(R8_8.11.18_94248c9a6fd57686ded562f231d18f14e8923ad1fe977e99b974a9bf901c8a48:12)
            at com.android.tools.r8.R8.a(R8_8.11.18_94248c9a6fd57686ded562f231d18f14e8923ad1fe977e99b974a9bf901c8a48:33)
            at com.android.tools.r8.R8.c(R8_8.11.18_94248c9a6fd57686ded562f231d18f14e8923ad1fe977e99b974a9bf901c8a48:8)
            at com.android.tools.r8.R8.a(R8_8.11.18_94248c9a6fd57686ded562f231d18f14e8923ad1fe977e99b974a9bf901c8a48:1657)
            at com.android.tools.r8.internal.xv.a(R8_8.11.18_94248c9a6fd57686ded562f231d18f14e8923ad1fe977e99b974a9bf901c8a48
          :28)
            ... 4 more
          Directory 'obj\Release\net10.0-android\lp\180' is from 'androidx.datastore.datastore-preferences-core-android.aar'
          .
    
    Build failed with 1 error(s) and 1 warning(s) in 52.0s
    

    I need to also add the Xamarin.AndroidX.DataStore.Preferences.Core one, then it builds.
    The other dependencies I use in that particular app are just these:

    <PackageReference Include="Xamarin.Android.Google.BillingClient" Version="8.3.0.1" />
    <PackageReference Include="Xamarin.AndroidX.Preference" Version="1.2.1.16" />
    <PackageReference Include="Xamarin.AndroidX.SwipeRefreshLayout" Version="1.2.0.1" />
    <PackageReference Include="Xamarin.Firebase.Crashlytics" Version="120.0.4" />
    <PackageReference Include="Xamarin.Google.Android.Material" Version="1.13.0.1" />
    <PackageReference Include="Xamarin.Google.Android.Play.Review" Version="2.0.2.6" />
    
  22. jonathanpeppers commented on Mar 3, 2026

    @jonathanpeppers
    Member

    @tipa so you did get it to work, with a combination of latest packages?

    We can bump all versions and realign, so you won't have to do that. Your top-level <PackageReference/> would increment by 0.0.0.1.

  23. tipa commented on Mar 3, 2026

    @tipa

    Yes, using both these two dependencies, the build appears to complete without error:

    <PackageReference Include="Xamarin.AndroidX.Compose.Runtime.Annotation" Version="1.10.3.1" />
    <PackageReference Include="Xamarin.AndroidX.DataStore.Preferences.Core" Version="1.2.0.2" />
    
  24. matteomonizza commented on Mar 4, 2026

    @matteomonizza

    Same here

  25. misterspeak commented on Apr 3, 2026

    @misterspeak

    I had this error and the cause was a file in a "buildtransitive" folder in my NuGet file cache (in my case p:\support\nugetpackages)

    Look in this folder for

    xamarin.androidx.compose.runtime.annotation.jvm\1.10.3\buildTransitive\net10.0-android36.0\Xamarin.AndroidX.Compose.Runtime.Annotation.Jvm.targets

    and delete or rename it.

    Has worked OK ever since :-) Maybe someone knows which package has a dependency causing this transitive to be loaded in the first place and fix it somehow?
    hth

  26. andrewleader commented on Jun 14, 2026

    @andrewleader

    Just sharing a THANK YOU, this issue seems to be fixed now! I used to have to have the following workaround in my project...

    	<!--Need these two Jvm packages to address .NET issue https://github.com/dotnet/android-libraries/issues/1341-->
    	<PackageReference Include="Xamarin.AndroidX.Compose.Runtime.Annotation.Jvm" Version="1.10.0.1" ExcludeAssets="all" />
    	<PackageReference Include="Xamarin.AndroidX.DataStore.Preferences.Core.Jvm" Version="1.2.0.1" ExcludeAssets="all" />
    

    But after updating to the latest Xamarin libraries, I was able to remove those packages!

  27. vpenades commented on Jun 15, 2026

    @vpenades

    Sadly I'm still getting there errors:

    Type androidx.core.animation.AnimatorKt$addListener$1 is defined multiple times: obj\Debug\net10.0-android36\lp\99\jl\classes.jar:androidx/core/animation/AnimatorKt$addListener$1.class, obj\Debug\net10.0-android36\lp\107\jl\classes.jar:androidx/core/animation/AnimatorKt$addListener$1.class
    

    with versions:

    <PackageVersion Include="Xamarin.AndroidX.Core" Version="1.19.0" />
    <PackageVersion Include="Xamarin.AndroidX.AppCompat" Version="1.7.1.3" />
    <PackageVersion Include="Xamarin.AndroidX.Lifecycle.Service" Version="2.10.0.2" />
    <PackageVersion Include="Xamarin.AndroidX.Core.SplashScreen" Version="1.2.0.2" />
    <PackageVersion Include="Xamarin.AndroidX.Camera.Lifecycle" Version="1.6.1" />
    <PackageVersion Include="Xamarin.AndroidX.Camera.Camera2" Version="1.6.1" />
  28. MagicAndre1981 commented on Sep 22, 2026

    @MagicAndre1981

    I also get this when trying to migrate to MAUI 11 Rc1:

    (0,1): error JAVA0000: Error in C:\Users\Andre\.nuget\packages\xamarin.androidx.compose.runtime.annotation.android\1.12.1\buildTransitive\net10.0-android36.0\..\..\aar\runtime-annotation-android.aar:classes.jar:
    Type androidx.compose.runtime.Immutable is defined multiple times: C:\Users\Andre\.nuget\packages\xamarin.androidx.compose.runtime.annotation.android\1.12.1\buildTransitive\net10.0-android36.0\..\..\aar\runtime-annotation-android.aar:classes.jar, C:\Users\Andre\.nuget\packages\xamarin.androidx.compose.runtime.annotation.jvm\1.12.1\buildTransitive\net10.0-android36.0\..\..\jar\runtime-annotation-jvm.jar:androidx/compose/runtime/Immutable.class
    Compilation failed
    java.lang.RuntimeException: com.android.tools.r8.CompilationFailedException: Compilation failed to complete, origin: C:\Users\Andre\.nuget\packages\xamarin.androidx.compose.runtime.annotation.android\1.12.1\buildTransitive\net10.0-android36.0\..\..\aar\runtime-annotation-android.aar
    classes.jar
    	at com.android.tools.r8.internal.lw0.a(R8_9.1.31_ffb8f76e0cfe19f6a6aff10b55ad38bc82c7544bc91f5b7fd86bc80f9b2412e7:127)
    	at com.android.tools.r8.D8.main(R8_9.1.31_ffb8f76e0cfe19f6a6aff10b55ad38bc82c7544bc91f5b7fd86bc80f9b2412e7:5)
    Caused by: com.android.tools.r8.CompilationFailedException: Compilation failed to complete, origin: C:\Users\Andre\.nuget\packages\xamarin.androidx.compose.runtime.annotation.android\1.12.1\buildTransitive\net10.0-android36.0\..\..\aar\runtime-annotation-android.aar:classes.jar
    	at Version.fakeStackEntry(Version_9.1.31.java:0)
    	at com.android.tools.r8.r0.a(R8_9.1.31_ffb8f76e0cfe19f6a6aff10b55ad38bc82c7544bc91f5b7fd86bc80f9b2412e7:1)
    	at com.android.tools.r8.internal.lw0.a(R8_9.1.31_ffb8f76e0cfe19f6a6aff10b55ad38bc82c7544bc91f5b7fd86bc80f9b2412e7:81)
    	at com.android.tools.r8.internal.lw0.a(R8_9.1.31_ffb8f76e0cfe19f6a6aff10b55ad38bc82c7544bc91f5b7fd86bc80f9b2412e7:32)
    	at com.android.tools.r8.internal.lw0.a(R8_9.1.31_ffb8f76e0cfe19f6a6aff10b55ad38bc82c7544bc91f5b7fd86bc80f9b2412e7:31)
    	at com.android.tools.r8.internal.lw0.b(R8_9.1.31_ffb8f76e0cfe19f6a6aff10b55ad38bc82c7544bc91f5b7fd86bc80f9b2412e7:2)
    	at com.android.tools.r8.D8.a(R8_9.1.31_ffb8f76e0cfe19f6a6aff10b55ad38bc82c7544bc91f5b7fd86bc80f9b2412e7:27)
    	at com.android.tools.r8.D8.b(R8_9.1.31_ffb8f76e0cfe19f6a6aff10b55ad38bc82c7544bc91f5b7fd86bc80f9b2412e7:23)
    	at com.android.tools.r8.D8.a(R8_9.1.31_ffb8f76e0cfe19f6a6aff10b55ad38bc82c7544bc91f5b7fd86bc80f9b2412e7:25)
    	at com.android.tools.r8.internal.lw0.a(R8_9.1.31_ffb8f76e0cfe19f6a6aff10b55ad38bc82c7544bc91f5b7fd86bc80f9b2412e7:114)
    	... 1 more
    Caused by: com.android.tools.r8.internal.j: Type androidx.compose.runtime.Immutable is defined multiple times: C:\Users\Andre\.nuget\packages\xamarin.androidx.compose.runtime.annotation.android\1.12.1\buildTransitive\net10.0-android36.0\..\..\aar\runtime-annotation-android.aar:classes.jar, C:\Users\Andre\.nuget\packages\xamarin.androidx.compose.runtime.annotation.jvm\1.12.1\buildTransitive\net10.0-android36.0\..\..\jar\runtime-annotation-jvm.jar:androidx/compose/runtime/Immutable.class
    	at com.android.tools.r8.internal.yp3.a(R8_9.1.31_ffb8f76e0cfe19f6a6aff10b55ad38bc82c7544bc91f5b7fd86bc80f9b2412e7:21)
    	at com.android.tools.r8.internal.i83.a(R8_9.1.31_ffb8f76e0cfe19f6a6aff10b55ad38bc82c7544bc91f5b7fd86bc80f9b2412e7:68)
    	at com.android.tools.r8.internal.i83.a(R8_9.1.31_ffb8f76e0cfe19f6a6aff10b55ad38bc82c7544bc91f5b7fd86bc80f9b2412e7:16)
    	at java.base/java.util.concurrent.ConcurrentHashMap.merge(ConcurrentHashMap.java:2056)
    	at com.android.tools.r8.internal.i83.a(R8_9.1.31_ffb8f76e0cfe19f6a6aff10b55ad38bc82c7544bc91f5b7fd86bc80f9b2412e7:10)
    	at com.android.tools.r8.graph.v9$a.c(R8_9.1.31_ffb8f76e0cfe19f6a6aff10b55ad38bc82c7544bc91f5b7fd86bc80f9b2412e7:3)
    	at com.android.tools.r8.dex.c.a(R8_9.1.31_ffb8f76e0cfe19f6a6aff10b55ad38bc82c7544bc91f5b7fd86bc80f9b2412e7:57)
    	at com.android.tools.r8.dex.c.a(R8_9.1.31_ffb8f76e0cfe19f6a6aff10b55ad38bc82c7544bc91f5b7fd86bc80f9b2412e7:12)
    	at com.android.tools.r8.D8.a(R8_9.1.31_ffb8f76e0cfe19f6a6aff10b55ad38bc82c7544bc91f5b7fd86bc80f9b2412e7:34)
    	at com.android.tools.r8.D8.d(R8_9.1.31_ffb8f76e0cfe19f6a6aff10b55ad38bc82c7544bc91f5b7fd86bc80f9b2412e7:20)
    	at com.android.tools.r8.D8.c(R8_9.1.31_ffb8f76e0cfe19f6a6aff10b55ad38bc82c7544bc91f5b7fd86bc80f9b2412e7:8)
    	at com.android.tools.r8.internal.lw0.a(R8_9.1.31_ffb8f76e0cfe19f6a6aff10b55ad38bc82c7544bc91f5b7fd86bc80f9b2412e7:28)
    	... 6 more
    

    VS 2026 Insiders [12210.170]

  29. MagicAndre1981 commented on Sep 22, 2026

    @MagicAndre1981

    Look in this folder for

    xamarin.androidx.compose.runtime.annotation.jvm\1.10.3\buildTransitive\net10.0-android36.0\Xamarin.AndroidX.Compose.Runtime.Annotation.Jvm.targets

    and delete or rename it.

    this worked for me, too. I renamed the Xamarin.AndroidX.Compose.Runtime.Annotation.Android.targets in .nuget\packages\xamarin.androidx.compose.runtime.annotation.android\1.12.1\buildTransitive\net10.0-android36.0 and now it works. Thanks for the workaround 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions