Kahbazi
Kahbazi

Reputation: 14995

Error in build for Xamarin Android when adding Google Map

I have an android xamarin project, and I only add Xamarin.GooglePlayServices.Maps nuget.

my build has this error :

error: package com.google.android.gms.maps does not exist com.google.android.gms.maps.OnMapReadyCallback

Upvotes: 0

Views: 291

Answers (2)

Kahbazi
Kahbazi

Reputation: 14995

I installed Google APIs , and Google play service, but still I got the error.

I check this path

obj\Debug\__library_projects__\Xamarin.GooglePlayServices.Maps\library_project_imports

and the folder was empty, this folder suppose to have .jar files for Google Map.

So I delete obj folder and now everything's working.

Upvotes: 0

Sunny
Sunny

Reputation: 1534

Please try this :

  • From the Tools menu, select Open AVD Manager
  • From the Tools menu of the Android Virtual Device Manager app, select Manage SDK..
  • For each of the Android SDK you are targeting, check the "Google APIs" checkbox and install the packages.
  • You should now have the Google Maps SDK installed.

Upvotes: 1

Related Questions