Skip to content

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

@leonardbarbu

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

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