Xamarin.Forms.Maps set up problem

Hi, I'm having a problem adding a map to my App. I am following the instructions from the page - https://docs.microsoft.com/en-us/xamarin/xamarin-forms/user-interface/map. Having added the Maps package via NuGet, I get 92 errors in my project, in multiple files. I won't list them all but here's the first one and the rest are of a similar flavour.

Severity Code Description Project File Line Suppression State
Error error: package com.google.android.gms.common.api.GoogleApiClient does not exist
com.google.android.gms.common.api.GoogleApiClient.ConnectionCallbacks MobileAppTest.Android C:\Documents\work\DOTNET\MobileAppTest\MobileAppTest\MobileAppTest.Android\obj\Debug\android\src\md513074be467e0034b6ca192c1689af813\GoogleApiClientConnectionCallbacksImpl.java 8

Each error indicates some package is missing. I have checked Android SDK Manager and everything is up-to-date.

In an attempt to work out what is going wrong, I created a new App straight 'out of the box' in VS 2017 and simply added the Maps package and the errors appeared. So I'm guessing it's something in my Android setup, but have no clue as to what?

Cheers
John

Tagged:

Posts

  • wollkopfwollkopf Member ✭✭

    Did your solve the issue? For me it helped to use the Visual Studio Preview Update. Now I'm on Version 15.8.0 Preview 2.

  • JohnBlack.2526JohnBlack.2526 USMember ✭✭

    I don't remember for certain, but I think it was one of those issues that went away by itself. After VS restart, or a machine reboot.

  • AuriAuri USMember ✭✭
    edited July 2018

    Having the same issue "all of a sudden". Restarting VS, even the machine didn't help. I didn't change any code. Pretty sure it's a package update issue.

    Here are the versions of the packages that are working for me in my project file... Maybe this will help you narrow down the issue:

    <PackageReference Include="HockeySDK.Xamarin">**this one probably doesn't matter to you :)**
      <Version>5.1.2</Version>
    </PackageReference>
    <PackageReference Include="Xam.Plugin.Geolocator">
      <Version>4.5.0.6</Version>
    </PackageReference>
    <PackageReference Include="Xam.Plugins.Messaging"> **this one probably doesn't matter to you :)**
      <Version>5.2.0</Version>
    </PackageReference>
    <PackageReference Include="Xamarin.FFImageLoading.Svg.Forms">
      <Version>2.3.6</Version>
    </PackageReference>
    <PackageReference Include="Xamarin.Forms" Version="3.0.0.561731" /> **once I upgraded Xamarin.Forms to 3.1, things broke, and reverting did not fix the issue... I hadn't checked in yet, though, so reverting to the previous check-in fixed my issue... I don't check in unless the app runs :)**
    <PackageReference Include="Xamarin.Android.Support.Design" Version="27.0.2.1" />
    <PackageReference Include="Xamarin.Android.Support.v7.AppCompat" Version="27.0.2.1" />
    <PackageReference Include="Xamarin.Android.Support.v4" Version="27.0.2.1" />
    <PackageReference Include="Xamarin.Android.Support.v7.CardView" Version="27.0.2.1" />
    <PackageReference Include="Xamarin.Android.Support.v7.MediaRouter" Version="27.0.2.1" />
    
    <PackageReference Include="Xamarin.FFImageLoading"> **this one probably doesn't matter to you :)**
      <Version>2.3.6</Version>
    </PackageReference>
    <PackageReference Include="Xamarin.FFImageLoading.Forms">**this one probably doesn't matter to you :)**
      <Version>2.3.6</Version>
    </PackageReference>
    <PackageReference Include="Xamarin.Forms.Maps">
      <Version>3.0.0.561731</Version>
    </PackageReference>
    
  • JohnBlack.2526JohnBlack.2526 USMember ✭✭

    These "all of a sudden" issues are a right royal PITA :p

    Unfortunately I can't really remember what I tried, but may be check the Android SDK Manager?

    It's possible a VS upgrade may help as wollkopf suggested, but I don't remember trying that. I am still back on 15.7.1 and all is good.

    Sorry that I can't be of more help :|

    John B)

Sign In or Register to comment.