I'm new to Xamarin unfortunately. I've been trying to create a simple page with a map on it using the Xamarin.Forms.Maps package, but upon building I run into about 92 errors all describing that various packages could not be found:
error: package com.google.android.gms.common.api.GoogleApiClient does not exist
error: package com.google.android.gms.common does not exist
error: package com.google.android.gms.maps.GoogleMap does not exist
error: package com.google.android.gms.maps does not exist
error: package com.google.android.gms.tasks does not exist
...and many others. My solution is a Cross-Platform Xamarin.Forms blank mobile app using a .NET class library which I have nothing but the NETStandard.Library, Xamarin.Forms and Xamarin.Forms.Maps packages installed on. I thought that I had set it up correctly according to the official Microsoft documentation, but I still get all these weird errors and searching online for a solution has not been much help. Can someone give me assistance? Let me know if I need to clarify anything.
I had exactly the same issue with the same 92 errors after upgrading my version of Xamarin.Forms to V3.0.0.561731 and installing the latest version of Xamarin.Forms.Maps in Visual Studio Community 2017.
I solved the issue by adding "Google Play Services" via the Android SDK Manager. The item can be found on the "Tools" tab of the Android SDK listed under "Extras".
Note: I had to come out of Visual Studio, and rebuild my solution, and it worked.
Make sure you have installed the nuget on your android project Xamarin.GooglePlayServices.Base and Xamarin.GooglePlayServices.Maps
It's a google maps API requisite. You can see an entire explanation on official documentation on this link: https://docs.microsoft.com/en-us/xamarin/android/platform/maps-and-location/maps/maps-api#google-maps-api-prerequisites
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With