If you are developing some application with Xamarin.Android, and a message like the following is displayed:
Severity Code Description Project File Line Suppression State
Error Could not install package ‘Xamarin.GooglePlayServices.Maps 42.1001.0’. You are trying to install this package into a project that targets ‘MonoAndroid,Version=v6.0’, but the package does not contain any assembly references or content files that are compatible with that framework.
Regularly due to you do not have a version of the Target Framework compatbile, in the specific case above, it is because we must have a version of Android 7, version that from the properties of a project Xamarin.Android we can see that we do not have:
To resolve this issue, or simply because you want to add a new version of Android to compile, here are the steps to take:
1.- Open the “Android SDK Manager” tool:
2.- In the list of versions of Android, you should notice which are the ones you have installed, and which ones do not, selecting those versions that you want to install, for example, in my case, I want to install the version of Android 7.1 (API 25):
3.- Click on the Install button.
4.- Accept the license and Install.
5.- With this, when re-opening Visual Studio will already appear the new version with which we can compile our Xamarin.Android projects: