Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change the Xamarin.Forms.Platform.Android.dll version

I have been scratching my head over this one for far too long, and I have found no information that helps online. I have tried to change the target/minimum frameworks, as well as try to update the packages which fail and say:

Unable to resolve dependencies. 'Xamarin.Android.Support.v7.CardView 23.4.0' 
is not compatible with 'Xamarin.Forms 2.2.0.43 constraint: 
Xamarin.Android.Support.v7.CardView (= 23.3.0)'.                

And an error on deployment after a successful build:

The $(TargetFrameworkVersion) for Xamarin.Forms.Platform.Android.dll (v6.0)
is greater than the $(TargetFrameworkVersion) for your project (v4.4). 
You need to increase the $(TargetFrameworkVersion) for your project. Squared    
C:\Users\USER\Repositories\SOLUTION\PROJECT\PROJECT.csproj

These errors arise for several packages simultaneously.

I would like to keep my frameworks as follows: enter image description here

I think my next step is to try to change the Xamarin.Forms.Platform.Android.dll version, but I am not sure how to go about that.

like image 258
Slvrfn Avatar asked Jul 10 '16 01:07

Slvrfn


People also ask

Does Xamarin support Android 12?

Android version 12.2. 0.4. Released February 15, 2022, and included in Visual Studio 2022 version 17.1 and Visual Studio 2022 for Mac Preview.

How do I check my Android version Xamarin?

For version check Help/About and then click Show Details. For Visual Studio updates go to Tools/Options and then Xamarin from the left tree. Below you'll find Xamarin.

What is the difference between Xamarin forms and Xamarin Android?

Generally, the main distinction between the two platforms is that Xamarin. Forms allows reusing the same UI code for multiple OS, whereas Xamarin Native is adapted to APIs, specific to a specific platform – Windows, iOS, Android.


1 Answers

For the field 'Compile using Android version:' you should use 'Android 6.0 (Marshmallow)' If it doesn't exist in the list, install it from android sdk manager. (install the exact version 23.3.0)

For TargetFrameworkVersion you should edit .csproj file. Find this tag and change its value to 6.0

like image 157
Mahdi Ataollahi Avatar answered Nov 26 '22 06:11

Mahdi Ataollahi