0
votes

im working on xamarin forms at the moment every time when i start a new xamarin form project i update the xamarin forms from the nuget package every things work fine until i started to work with maps and every time i install the xmarin.forms.maps after the install is finished i try to build my solution keeps throw 8 errors.droid the problem is in the android platform only

Severity Code Description Project File Line Suppression State Error Please install package: 'GPS Base' available in SDK installer. Android resource directory C:\Users\IBRAHIM\AppData\Local\Xamarin\Xamarin.GooglePlayServices.Base\8.4.0\content./ doesn't exist. WorkingWithMaps.Android
Error Please install package: 'GPS Maps' available in SDK installer. Java library file C:\Users\IBRAHIM\AppData\Local\Xamarin\Xamarin.GooglePlayServices.Maps\8.4.0\content\classes.jar doesn't exist. WorkingWithMaps.Android
Error Please install package: 'GPS Base' available in SDK installer. Java library file C:\Users\IBRAHIM\AppData\Local\Xamarin\Xamarin.GooglePlayServices.Base\8.4.0\content\classes.jar doesn't exist. WorkingWithMaps.Android
Error Please install package: 'GPS Basement' available in SDK installer. Android resource directory C:\Users\IBRAHIM\AppData\Local\Xamarin\Xamarin.GooglePlayServices.Basement\8.4.0\content./ doesn't exist. WorkingWithMaps.Android
Error Reason: File C:\Users\IBRAHIM\AppData\Local\Xamarin\zips\CAA441D76F04E0D57C4110F8A00CDA7A.zip is not a ZIP archive WorkingWithMaps.Android
Error Please install package: 'GPS Maps' available in SDK installer. Android resource directory C:\Users\IBRAHIM\AppData\Local\Xamarin\Xamarin.GooglePlayServices.Maps\8.4.0\content./ doesn't exist. WorkingWithMaps.Android
Error Please install package: 'GPS Basement' available in SDK installer. Java library file C:\Users\IBRAHIM\AppData\Local\Xamarin\Xamarin.GooglePlayServices.Basement\8.4.0\content\classes.jar doesn't exist. WorkingWithMaps.Android
Error Unzipping failed. Please download https://dl-ssl.google.com/android/repository/google_m2repository_r24.zip and extract it to the C:\Users\IBRAHIM\AppData\Local\Xamarin\Xamarin.GooglePlayServices.Base\8.4.0\content directory. WorkingWithMaps.Android

ive been stuck for 3 days now pleasee HELLPPPP MEEE OUT !!!

google play services base and basement folders are empty what should id

3
Can you show the android project reference?I think you may miss some dependency in android project.Mike Ma

3 Answers

0
votes

This is obviously not related to any SDK.The log clearly states the issue. Your nuget packages are corrupted , this has happens when you try updating your xamarin forms to the latest version, along with other packages.

First I would recommend starting a fresh project. When installing Xamarin forms maps, ensure that all the version of the nuget package match, ensure there is no version mismatch. Do not update to the latest version. Find a mid-level stable version of the package needed and update to this. Now go to each Device specific component and check the references ensure there is no (!) under the referenced package.

Second Navigate to your appdata directory close visual studio. C:\Users\john.doe\AppData\Local\ in this directory find the Xamarin folder. Delete the "Xamarin" folder.

Open VS ===> Clean solution, and Rebuild the entire solution. This will take a while, because you will re-download all the packages. Viola!! Happy coding.

Thank you

1
votes

I ended up having to do it by hand... Here are the steps though

  1. Download zip file (https://dl-ssl.google.com/android/repository/google_m2repository_r22.zip)
  2. Extra zip file
  3. Go to folder you need the library for (let's say play-services-base)
  4. Go to version (example: 8.1.0)
  5. Rename file ending in .aar to .jar
  6. Extract .jar file to a folder (I used 7Zip)
  7. Copy all the contents of the folder
  8. Go to "C:\Users{USER}\AppData\Local\Xamarin"
  9. If doesn't exist, create needed folder (for "play-services-base" I created "Xamarin.GooglePlayServices.Base")
  10. Created folder for version (Example: 8.1.0) and then a folder in that called "embedded"
  11. Paste files from before into this folder
  12. Go back to step 3 and keep repeating till all libraries are added

Ya it's a pain.... But it works

0
votes

i think you must have to update your SDK. then give proper permission for the map related implementation i hope that it will work fine in my case it is working good.