thudugala / Plugin.LocalNotification

The local notification plugin provides a way to show local notifications from .Net MAUI and Xamarin Forms apps .
MIT License
401 stars 66 forks source link

GeofencingClient was removed in Xamarin.GooglePlayServices.Location 121.x #455

Closed ivmirx closed 7 months ago

ivmirx commented 8 months ago

Describe the bug Release builds with linker enabled fail with the following error:

/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Legacy.targets(5,5): Error XALNK7000: Mono.Linker.MarkException: Error processing method: 'System.Void Plugin.LocalNotification.Platforms.NotificationServiceImpl::.ctor()' in assembly: 'Plugin.LocalNotification.dll' ---> Mono.Cecil.ResolutionException: Failed to resolve Android.Gms.Location.GeofencingClient Android.Gms.Location.LocationServices::GetGeofencingClient(Android.Content.Context)

To Reproduce Try building and running the app on device with Linker -> Link SDK assemblies only

Platform (please complete the following information):

Smartphone (please complete the following information):

Additional context Rolling back to Xamarin.GooglePlayServices.Location 120.x fixes the issue.

Not sure why the class is no there, doesn't seem like it's obsolete – could be a Xamarin package issue?

Anyway, thanks for the great plugin!

thudugala commented 8 months ago

@ivmirx Can you please attach a sample project?

ivmirx commented 7 months ago

Sorry, I've been super overwhelmed lately and just can't setup a test project. Also the Xamarin packages for Android were just updated, so maybe it's fixed in a newer package version. I'll keep it closed for now if it doesn't happen to anyone else.

mogue2k3 commented 5 months ago

I have the same problem with my project.