casillas
casillas

Reputation: 16813

com.google.gms.location does not exist

I am trying to add a map on the Xamarin.Android application. So far, I have added only map, I did not add any location listener. However, I keep getting the following error

package,com.google.gms.location does not exist

I wonder what I am missing or doing wrong?

Here is the dll's added into the references from the nuget

enter image description here

enter image description here

Upvotes: 0

Views: 881

Answers (2)

Elvis Xia - MSFT
Elvis Xia - MSFT

Reputation: 10841

If you want to use GooglePlayService. The test device/emulator of your app needs to include Google API. If you are using an emulator you can follow the steps below:

  1. Download Google API System Image for your android API Level through Tools->Android->Android SDK Manager(ex for API Level 25 ): enter image description here

  2. Create a new Google API Emulator through Tools->Android->Android Emulator Manager->Create:

enter image description here

  1. Clean your project and rebuild it, run your project in this emulator.

Upvotes: 0

woelliJ
woelliJ

Reputation: 1504

  1. Make sure all packages are of the same version (27.0.0)
  2. Make sure Xamarin.Build.Download is installed (it downloads the required .jar files etc.)
  3. Clean & Rebuild the android Project
  4. Try entering Update-Package -Reinstall Xamarin.GooglePlayServices.Locationinto the package manager console
  5. Clean & Rebuild the android Project
  6. Try a higher version number of the package (newer ones are stable too)

Upvotes: 1

Related Questions