jamesmontemagno / GeolocatorPlugin

Geolocation plugin for Xamarin and Windows
MIT License
294 stars 158 forks source link

When building for Android Error XA2002: Can not resolve reference #312

Open HeadBanging opened 5 years ago

HeadBanging commented 5 years ago

This may not be a bug - but I can't think how else to report it. Any help that you can provide will be gratefully received.

Bug Information

Version Number of Plugin: 4.5.0.6 Device Tested On: Motorola Moto G 5S / iPhone 7 Simulator Tested On: Qemu API24 / iPhone Simulator Version of VS: Visual Studio Mac 8.2.2 Version of Xamarin: Xamarin Android 9.4.1.0 / Xamarin iOS 12.14.0.114 Versions of other things you are using:

Steps to reproduce the Behavior

Build for iOS, run on real hardware Build for Android, run on real hardware

Expected Behavior

On iOS - build successfully, run successfully, get geolocation On Android - build successfully, run successfully, get geolocation

Actual Behavior

On iOS - it builds successfully, it runs successfully, it gets geolocation On Android it fails to build with error: Error XA2002: Can not resolve reference: 'Plugin.Geolocator.Abstractions', referenced by 'Plugin.Geofencing'. Please add a NuGet package or assembly reference for 'Plugin.Geolocator.Abstractions', or remove the reference to 'Plugin.Geofencing'.

I have attempted to resolve this issue by reinstalling Xam.Plugin.Geolocator in the Android project but the same error occurs each time.

Code snippet

N/A - issue is to do with installation of package

Screenshotst

N/A - issue is to do with installation of package

rohitvipin commented 5 years ago

Are you using Xamarin.Forms? Which version? Did you add the project reference to all the platform projects and dotnet standard project? Please ensure you follow step by step from the readme. Are you able to recreate the issue in a new project with no dependencies? If so can you post the link to it?