Xamarin - How to update Mono.Android version to re

2019-01-12 03:23发布

It's quite late at night and I'm trying to resist the urge to throw punches at my laptop while cursing Microsoft and Xamarin because Visual Studio has been frustrating me. So 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? I'm at my wit's end here and seem to be stuck in deadlock :(

1条回答
在下西门庆
2楼-- · 2019-01-12 03:51

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:

enter image description here

Visual Studio for Mac:

enter image description here

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:

enter image description here

Visual Studio for Mac:

enter image description here

查看更多
登录 后发表回答