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 Framework – Specifies which framework to use in building your application. This API level is used at compile time by Xamarin.Android.
Minimum Android Version – Specifies the oldest Android version that you want your app to support. This API level is used at run time by Android.
Target Android Version – Specifies the version of Android that your app is intended to run on. This API level is used at run time by Android.
Manifest Entries:
Visual Studio for Windows:
Visual Studio for Mac:
Related videos on Youtube
Ibraheem Nofal
Updated on October 17, 2021Comments
-
Ibraheem Nofal over 2 years
I'm trying to install a nuget package (Xamarin.Firebase.Firestore) which requires a newer version of Xamarin.GooglePlayServices.Basement (60.1142.0, I have 42.1021.1), which in turn requires me to update the xamarin.android.support packages. When I try to update those, I get this error "Package Xamarin.Android.Support.Design 27.0.2 is not compatible with monoandroid80 (MonoAndroid,Version=v8.0). Package Xamarin.Android.Support.Design 27.0.2 supports: monoandroid81 (MonoAndroid,Version=v8.1)"
I've tried changing my target android version to 8.1, I've also updated my SDK as well as the build tools. I'm running Visual Studio 15.6.1. As a last ditch effort, I tried deleting the Mono.Android V8.0 reference and then adding a new reference to V8.1, but whenever I do so, Visual studio just ends up adding the reference with the path pointing to V8.0, even though the reference I added was clearly pointing to V8.1.
Anyone has a clue how to resolve this issue?
-
Ibraheem Nofal about 6 yearsMan, you are a legend! Keep getting hungover on that sushi :p Seriously though, thank you so much, that did the trick! I thought that the target android version was the same as the target framework
-
SushiHangover about 6 years@IbraheemNofal Glad it help 🍣
-
Niels almost 6 yearsIf this still does not work: Set the target framework explicitly instead of "Use latest installed platform"
-
Bradley Mountford about 5 yearsThank you so much!! Just making the move from web development to mobile development and my head is getting sore from beating it against my desk so much. It is nice to find a quick and concise solution to at least one of my problems!
-
SushiHangover about 5 years@BradleyMountford 🍣Happy coding!