Search code examples
xamarinxamarin.formscompiler-errors

Xamarin Google API client does not exist?


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.


Solution

  • 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.