Xamarin choosing TargetFramework and MinimumAndroidVersion

13,639

This answer is for Visual Studio 2017. If you are using Xamarin Studio for mac, then you have to look for similar option.

The $(TargetFrameworkVersion) for Xamarin.Forms.Platform.Android.dll (vv7.1)

It means, the project is using SDK 7.1 i.e. Xamarin.Forms.Platform.Android.dll (vv7.1). May be you had selected Compile Using Android Version (Target Framework) lower than v7.1 in the project setting.

If you set Android 7.1 Nougat to compile your project it will work. You can set this from Project Properties >> Application menu

The minimum android version for this project must be 7.0.

This means the minimum Android OS version on which you want to make your App available.

This can be set from -

Project Properties >> Android Manifest >> Minimum Android Version dropdown

For more details - refer below link

https://docs.microsoft.com/en-us/xamarin/android/app-fundamentals/android-api-levels?tabs=vswin

Share:
13,639
Justas S
Author by

Justas S

A fairly young programmer trying to make it in the world and learn as much as possible! Well, atleast that's the way I see myself...

Updated on June 21, 2022

Comments

  • Justas S
    Justas S almost 2 years

    I'm developing a Xamarin Forms application(currently only Android support). The default setup set TargetFramework to 7.1. The minimum android version for this project must be 7.0. This produces a warning:

    The $(TargetFrameworkVersion) for Xamarin.Forms.Platform.Android.dll (vv7.1) is greater than the $(TargetFrameworkVersion) for your project (v7.0). You need to increase the $(TargetFrameworkVersion) for your project. It seems natural to me, to compile for the version that you will be using. Is that not the case?

    This articles recommends to always compile with the latest version. Is there any benefit to compiling with the latest version for my application? https://docs.microsoft.com/en-us/xamarin/android/app-fundamentals/android-api-levels?tabs=vswin#framework

  • Justas S
    Justas S about 6 years
    I know how to change the Target Framework version, my question is should I? What are the advantages of compiling using a newer SDK, considering the app is not meant to run on a device with the same version?
  • GauravKP
    GauravKP about 6 years
    You can use latest theme for example.
  • Justas S
    Justas S about 6 years
    And this will work on an older version(assuming support libraries are installed) ?
  • GauravKP
    GauravKP about 6 years
    Yes, it must. In my project I had used Compile Using Android Version (Target Framework) = 7.1 But target device OS is Android 4.4 and the app runs fine. I had not tested below that. There is a very nice explanation here docs.microsoft.com/en-us/xamarin/android/app-fundamentals/…
  • Arun Prasad
    Arun Prasad almost 4 years
    The explanation is very clear and provide idea about resolving any issue. Thanks