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

15,014

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

Share:
15,014

Related videos on Youtube

Slvrfn
Author by

Slvrfn

I stack with my screen off

Updated on July 05, 2022

Comments

  • Slvrfn
    Slvrfn about 2 years

    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.

  • Aberro
    Aberro almost 7 years
    This isn't an proper answer, because he said he wanted to keep old framework. So do I, because current latest stable 7.1.1 doesn't have Google APIs in SDK manager, which I needed because Xamarin.Forms previewer requires some files and won't work when project is build for 7.1.1.
  • Slvrfn
    Slvrfn almost 6 years
    This question has been getting some more popularity, so i wanted to highlight the only action i needed to take was using the latest Android version to compile against.