-
Notifications
You must be signed in to change notification settings - Fork 556
Duplicate of#764
Duplicate of#764
Copy link
Labels
Area: BindingsIssues in Java Library Binding projects.Issues in Java Library Binding projects.
Description
Description
Many android binding libraries require at least: Xamarin.AndroidX.Lifecycle.LiveData
version 2.8.7.1
but MAUI 9.0.22
requires older version >=2.8.5.1 && < 2.8.6
and because of this our Android binding fails to build.
The reason why .NET 8.0.100
works with this is because it's dependencies dont contain upper version limit. It requires just Xamarin.AndroidX.Lifecycle.LiveData
version >2.6.1.3
Version conflict detected for Xamarin.AndroidX.Lifecycle.LiveData.Core. Install/reference Xamarin.AndroidX.Lifecycle.LiveData.Core 2.8.7.1 directly to project DemoApp to resolve this issue.
DemoApp -> Kebechet.Maui.RevenueCat.InAppBilling -> Kebechet.Maui.RevenueCat.Android 7.12.0.4 -> Xamarin.AndroidX.Fragment.Ktx 1.8.5.1 -> Xamarin.AndroidX.Fragment 1.8.5.1 -> Xamarin.AndroidX.Lifecycle.LiveData.Core (>= 2.8.7.1)
DemoApp -> Microsoft.Maui.Controls 9.0.22 -> Microsoft.Maui.Controls.Core 9.0.22 -> Microsoft.Maui.Core 9.0.22 -> Xamarin.AndroidX.Lifecycle.LiveData 2.8.5.1 -> Xamarin.AndroidX.Lifecycle.LiveData.Core (>= 2.8.5.1 && < 2.8.6).
Potentially connected to:
marcojak/MauiMTAdmob#113
Steps to Reproduce
- Download branch
_net9-compatability
https://github.com/Kebechet/Maui.RevenueCat.InAppBilling/tree/_net9-compatability - Try to build
demo/DemoApp/DemoApp.sln
- You will get the error I mentioned above because of dependency incompatabilities
Link to public reproduction project repository
https://github.com/Kebechet/Maui.RevenueCat.InAppBilling/tree/_net9-compatability
Version with bug
9.0.22 SR2.2
Is this a regression from previous behavior?
Yes, this used to work in .NET MAUI
Last version that worked well
8.0.100 SR10
Affected platforms
Android
Affected platform versions
No response
Did you find any workaround?
nope
Relevant log output
Version conflict detected for Xamarin.AndroidX.Lifecycle.LiveData.Core. Install/reference Xamarin.AndroidX.Lifecycle.LiveData.Core 2.8.7.1 directly to project DemoApp to resolve this issue.
DemoApp -> Kebechet.Maui.RevenueCat.InAppBilling -> Kebechet.Maui.RevenueCat.Android 7.12.0.4 -> Xamarin.AndroidX.Fragment.Ktx 1.8.5.1 -> Xamarin.AndroidX.Fragment 1.8.5.1 -> Xamarin.AndroidX.Lifecycle.LiveData.Core (>= 2.8.7.1)
DemoApp -> Microsoft.Maui.Controls 9.0.22 -> Microsoft.Maui.Controls.Core 9.0.22 -> Microsoft.Maui.Core 9.0.22 -> Xamarin.AndroidX.Lifecycle.LiveData 2.8.5.1 -> Xamarin.AndroidX.Lifecycle.LiveData.Core (>= 2.8.5.1 && < 2.8.6).
Saurus119, Dreamescaper, DawidBester, ENeMy235, Kebechet and 9 more
Metadata
Metadata
Labels
Area: BindingsIssues in Java Library Binding projects.Issues in Java Library Binding projects.
Type
Projects
Milestone
Relationships
Development
Select code repository
Activity
Marnie-Majait commentedon Jan 14, 2025
This issue has been verified Visual Studio 17.13 Preview 2.1 (9.0.22 & 9.0.21 & 9.0.0). Can repro this issue on android platform. 8.0.100 works fine.
moljac commentedon Jan 16, 2025
.NET 9 is properly compatible with Android libraries, but .NET 9 is stricter with dependencies (transitive)
If you add:
You will get new set of errors
Those errors are known and described in
dotnet/android-libraries#764
Something is using (as transitive dependency)
Binding.Intercom.Kotlinx.Serialization.*
which is not officially supported bindings.Type XYZ is defined multiple times
||packages generated by more than one managed type
dotnet/android-libraries#764jpobst commentedon Jan 30, 2025
Tracked here: dotnet/android-libraries#764.
Type XYZ is defined multiple times
||packages generated by more than one managed type
dotnet/android-libraries#764Kebechet commentedon Feb 9, 2025
Thank you for the info. I resolved it in:
Kebechet/Maui.RevenueCat.InAppBilling@7243bf9
and everything works as expected