Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

[Bug] SR4 conflicts with most of the latest nugets like Xamarin.Firebase.Ads #14417

Closed
AndreasReitberger opened this issue Jul 13, 2021 · 9 comments
Labels
p/Android s/unverified New report that has yet to be verified t/bug 🐛
Projects

Comments

@AndreasReitberger
Copy link

AndreasReitberger commented Jul 13, 2021

Description

I just upgraded to SR4, however most upgrades leads to conflicts with the Android dependencies.

Just an example:

Version conflict detected for Xamarin.AndroidX.Lifecycle.LiveData. Install/reference Xamarin.AndroidX.Lifecycle.LiveData 2.3.0.1 directly to project RemoteControlRepetierServer.Android to resolve this issue. 
 RemoteControlRepetierServer.Android -> Plugin.LocalNotification 6.1.0 -> Xamarin.AndroidX.Work.Runtime 2.5.0.1 -> Xamarin.AndroidX.Lifecycle.LiveData (>= 2.3.0.1) 
 RemoteControlRepetierServer.Android -> Xamarin.Forms 5.0.0.2083 -> Xamarin.AndroidX.Lifecycle.LiveData (>= 2.2.0.4 && < 2.3.0).
Version conflict detected for Xamarin.AndroidX.Lifecycle.LiveData. Install/reference Xamarin.AndroidX.Lifecycle.LiveData 2.3.0.1 directly to project RemoteControlRepetierServer.Android to resolve this issue. 
 RemoteControlRepetierServer.Android -> Xamarin.Firebase.Ads 120.2.0 -> Xamarin.GooglePlayServices.Ads 120.2.0 -> Xamarin.GooglePlayServices.Ads.Lite 120.2.0 -> Xamarin.AndroidX.Work.Runtime 2.5.0.1 -> Xamarin.AndroidX.Lifecycle.LiveData (>= 2.3.0.1) 
 RemoteControlRepetierServer.Android -> Xamarin.Forms 5.0.0.2083 -> Xamarin.AndroidX.Lifecycle.LiveData (>= 2.2.0.4 && < 2.3.0).

@PureWeen
Could this be caused by this PR?
#14101

Some plugins needed amarin.AndroidX.Lifecycle.LiveData > 2.3.0 which I've tried so far.

  • Plugin.LocalNotifications
  • Xamarin.Firebase.Ads

Workarround

See this comment: #14417 (comment)

@AndreasReitberger AndreasReitberger added s/unverified New report that has yet to be verified t/bug 🐛 labels Jul 13, 2021
@developer9969
Copy link

Yeah something is not right or intended not sure
Basically this latest version is not compatible with the latest version of some android components.
Liveddata
Recicleview
Android.core
We had to downgrade those

@AndreasReitberger AndreasReitberger mentioned this issue Jul 14, 2021
2 tasks
@MagicAndre1981
Copy link
Contributor

MagicAndre1981 commented Jul 14, 2021

I also see this when following the advice to add AndroidX nugets directly

Warning	NU1608	Detected package version outside of dependency constraint: Xamarin.Forms 5.0.0.2083 requires Xamarin.AndroidX.RecyclerView (>= 1.1.0.8 && < 1.2.0) but version Xamarin.AndroidX.RecyclerView 1.2.1 was resolved.	
Warning	NU1608	Detected package version outside of dependency constraint: Xamarin.Forms 5.0.0.2083 requires Xamarin.Google.Android.Material (>= 1.2.1.1 && < 1.3.0) but version Xamarin.Google.Android.Material 1.4.0 was resolved.
Warning	NU1608	Detected package version outside of dependency constraint: Xamarin.Forms 5.0.0.2083 requires Xamarin.AndroidX.Lifecycle.LiveData (>= 2.2.0.4 && < 2.3.0) but version Xamarin.AndroidX.Lifecycle.LiveData 2.3.1 was resolved.		
Warning	NU1608	Detected package version outside of dependency constraint: Xamarin.Forms 5.0.0.2083 requires Xamarin.AndroidX.Core (>= 1.3.2.3 && < 1.4.0) but version Xamarin.AndroidX.Core 1.6.0 was resolved.

@aritchie
Copy link

You can manually force the libraries by editing your head android project. Edit in the following:

<PackageReference Include="Xamarin.Forms" Version="5.0.0.2083" />
<PackageReference Include="Xamarin.AndroidX.Core" Version="1.6.0" />
<PackageReference Include="Xamarin.AndroidX.Lifecycle.LiveData" Version="2.3.1" />

This allows you to break the upper bound version enforcement (add any other libs that may have been missed). I've been doing this for months to keep pushing forward with other AndroidX libraries and XF hasn't had an issue that I can see from the updates.

@AndreasReitberger
Copy link
Author

You can manually force the libraries by editing your head android project. Edit in the following:

<PackageReference Include="Xamarin.Forms" Version="5.0.0.2083" />

<PackageReference Include="Xamarin.AndroidX.Core" Version="1.6.0" />

<PackageReference Include="Xamarin.AndroidX.Lifecycle.LiveData" Version="2.3.1" />

This allows you to break the upper bound version enforcement (add any other libs that may have been missed). I've been doing this for months to keep pushing forward with other AndroidX libraries and XF hasn't had an issue that I can see from the updates.

Thank you @aritchie
I'll try it :)

@ianthetechie
Copy link

Any movement? It's beyond annoying to not be able to update Xamarin.Forms. It was always a fools hope, but every once in a while I dream of doing package updates and getting fixes to long-standing bugs.

@MagicAndre1981
Copy link
Contributor

Simply add packages this way:

<PackageReference Include="Xamarin.AndroidX.Lifecycle.LiveData" Version="2.3.1.1" NoWarn="NU1608" />

to skip the NU1608 warning.

The only package you need to limit to 1.3 is the Google Material, 1.4 has breaking changes

@bddckr
Copy link

bddckr commented Sep 14, 2021

It looks like some/most/all of these issues are getting resolved thanks to #14506.

It's listed to be in the latest service release, but I cannot find it on nuget.org yet.

@jsuarezruiz Hey sorry to ping you, but is 5.0.0-sr5 still coming to nuget.org? I checked for whether there might just be some CD automation still running, but I haven't been able to find any.

@TomBruyneel
Copy link

Same question, sr5 is not on nuget but listed on the releases here, is there a reason for it?

@bddckr
Copy link

bddckr commented Sep 27, 2021

5.0.0.2125 is available on NuGet now and fixes this issue for me.

Triage automation moved this from New to Closed Sep 27, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
p/Android s/unverified New report that has yet to be verified t/bug 🐛
Projects
Triage
  
Closed
Development

No branches or pull requests

8 participants