Xamarin – How to update Mono.Android version to resolve dependencies?

tried changing my target android version to 8.1 You need to change the Target Framework that is used to compile your android application, not the Target Android version (but assumably you would set these two to the same, read the Understanding Android API Levels link below. Visual Studio for Windows: Visual Studio for Mac: Target … Read more

Invalid value ‘armeabi’ in $(AndroidSupportedAbis). This ABI is no longer supported. Xamarin.Forms – VS2019

armeabi is deprecated and your Android project should target armeabi-v7a and arm64-v8a at a minimum in your release builds destined for the Play Store. You can directly edit your .csproj and remove the armeabi from within the AndroidSupportedAbis tags: <AndroidSupportedAbis>armeabi-v7a;arm64-v8a</AndroidSupportedAbis> Or you can open the Android Build settings in the IDE and it will auto-update … Read more

The “ResolveLibraryProjectImports” task failed unexpectedly

I’ve literally just had this with a brand new Xamarin.Forms application in Visual Studio 2017. The root cause appears to be that I let VS2017 create the project in it’s default location ‘C:\Users\Dave\Documents\Visual Studio 2017\Projects’ and this has resulted in one of more files now having a path which it too long. I moved the … Read more

Write device platform specific code in Xamarin.Forms

This is a scenario which is easily resolved with dependency injection. Have a interface with the desired methods on your shared or PCL code, like: public interface IUserPreferences { void SetString(string key, string value); string GetString(string key); } Have a property on your App class of that interface: public class App { public static IUserPreferences … Read more

Xamarin: Connect to locally hosted web service

If you’re using an Android Emulator then asking for the localhost web service won’t work, because you’re looking at the localhost of the emulator. How can you fix this? Well, Android Emulator has a magic address http://10.0.2.2:your_port that points to 127.0.0.1:your_port on your host machine.Take a look here. Because it points to an IP and … Read more