Skip to content

Latest Xamarin.AndroidX.Fragment and Xamarin.AndroidX.Fragment.Ktx are incompatible with each other #1030

@inimirpaz

Description

@inimirpaz

Android framework version

net8.0-android

Affected platform version

.NET 8.0.400

Description

It all boils down to the dependency Xamarin.AndroidX.Lifecycle.Runtime being used by the two.

Version conflict detected for Xamarin.AndroidX.Lifecycle.Runtime. Install/reference Xamarin.AndroidX.Lifecycle.Runtime 2.8.6 directly to project MyTest to resolve this issue. 
 MyTest -> Xamarin.AndroidX.Fragment 1.8.4 -> Xamarin.AndroidX.Lifecycle.Runtime (>= 2.8.6) 
 MyTest -> Xamarin.AndroidX.Fragment.Ktx 1.8.4 -> Xamarin.AndroidX.Activity.Ktx 1.9.2.1 -> Xamarin.AndroidX.Lifecycle.Runtime.Ktx 2.8.5.1 -> Xamarin.AndroidX.Lifecycle.Runtime (>= 2.8.5.1 && < 2.8.6).

Steps to Reproduce

Reference the packages in the .csproj

	<ItemGroup Condition="$(TargetFramework.Contains('-android'))">
		<PackageReference Include="Xamarin.AndroidX.Fragment" Version="1.8.4" />
		<PackageReference Include="Xamarin.AndroidX.Fragment.Ktx" Version="1.8.4" />
	</ItemGroup>

Did you find any workaround?

No response

Relevant log output

No response

Activity

tungd776

tungd776 commented on Nov 3, 2024

@tungd776

Android framework version

net8.0-android

Affected platform version

.NET 8.0.400

Description

It all boils down to the dependency Xamarin.AndroidX.Lifecycle.Runtime being used by the two.


Version conflict detected for Xamarin.AndroidX.Lifecycle.Runtime. Install/reference Xamarin.AndroidX.Lifecycle.Runtime 2.8.6 directly to project MyTest to resolve this issue. 

 MyTest -> Xamarin.AndroidX.Fragment 1.8.4 -> Xamarin.AndroidX.Lifecycle.Runtime (>= 2.8.6) 

 MyTest -> Xamarin.AndroidX.Fragment.Ktx 1.8.4 -> Xamarin.AndroidX.Activity.Ktx 1.9.2.1 -> Xamarin.AndroidX.Lifecycle.Runtime.Ktx 2.8.5.1 -> Xamarin.AndroidX.Lifecycle.Runtime (>= 2.8.5.1 && < 2.8.6).

Steps to Reproduce

Reference the packages in the .csproj


	<ItemGroup Condition="$(TargetFramework.Contains('-android'))">

		<PackageReference Include="Xamarin.AndroidX.Fragment" Version="1.8.4" />

		<PackageReference Include="Xamarin.AndroidX.Fragment.Ktx" Version="1.8.4" />

	</ItemGroup>

Did you find any workaround?

No response

Relevant log output

No response

inimirpaz

inimirpaz commented on Nov 8, 2024

@inimirpaz
Author

Something somewhat similar is happening now with 1.8.5 versions:

Version conflict detected for Xamarin.AndroidX.Lifecycle.Runtime. Install/reference Xamarin.AndroidX.Lifecycle.Runtime 2.8.7 directly to project MyTest to resolve this issue. 
 MyTest -> Xamarin.AndroidX.Fragment.Ktx 1.8.5 -> Xamarin.AndroidX.Core.Core.Ktx 1.15.0 -> Xamarin.AndroidX.Core 1.15.0 -> Xamarin.AndroidX.Lifecycle.Runtime (>= 2.8.7) 
 MyTest -> Xamarin.AndroidX.Fragment.Ktx 1.8.5 -> Xamarin.AndroidX.Activity.Ktx 1.9.3 -> Xamarin.AndroidX.Lifecycle.Runtime.Ktx 2.8.6 -> Xamarin.AndroidX.Lifecycle.Runtime (>= 2.8.6 && < 2.8.7).
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

        Participants

        @inimirpaz@tungd776

        Issue actions

          Latest Xamarin.AndroidX.Fragment and Xamarin.AndroidX.Fragment.Ktx are incompatible with each other · Issue #1030 · dotnet/android-libraries