Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

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?

like image 374
Ibraheem Nofal Avatar asked Mar 13 '18 00:03

Ibraheem Nofal


People also ask

Does Xamarin use Mono?

Xamarin. Android applications run within the Mono execution environment. This execution environment runs side-by-side with the Android Runtime (ART) virtual machine. Both runtime environments run on top of the Linux kernel and expose various APIs to the user code that allows developers to access the underlying system.

Is Xamarin getting deprecated?

In May 2020, Microsoft announced that Xamarin. Forms, a major component of its mobile app development framework, would be deprecated in November 2021 in favour of a new . Net based product called MAUI - Multiform App User Interface.

What is Mono Android in Xamarin?

The Xamarin Platform is the edition of Mono for Android that provides access to all of the native Android APIs. It is available both as part of Microsoft Visual Studio, or as an open source project. Please visit the Xamarin site for more information on Mono/. NET on Android. © 2022 Mono Project.

How do I upgrade Xamarin?

Go to Tools > Extensions and Updates... and click on the Installed list to check that the NuGet Package Manager for Visual Studio is at least version 2.8. 5. If it is older, click on the Updates list to download the latest version. Once you've updated the NuGet package to Xamarin.


1 Answers

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.

  • Understanding Android API Levels

Manifest Entries:

Visual Studio for Windows:

enter image description here

Visual Studio for Mac:

enter image description here

like image 146
SushiHangover Avatar answered Sep 23 '22 16:09

SushiHangover