Xamarin选择TargetFramework和MinimumAndroidVersion [英] Xamarin choosing TargetFramework and MinimumAndroidVersion

查看:598
本文介绍了Xamarin选择TargetFramework和MinimumAndroidVersion的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发Xamarin Forms应用程序(目前仅支持Android).默认设置将TargetFramework设置为7.1.此项目的最低android版本必须为7.0.这会产生警告:

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:

Xamarin.Forms.Platform.Android.dll(vv7.1)的$(TargetFrameworkVersion)大于项目(v7.0)的$(TargetFrameworkVersion).您需要为项目增加$(TargetFrameworkVersion). 对我来说,为您将要使用的版本进行编译似乎很自然.不是吗?

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?

本文建议始终使用最新版本进行编译.使用我的应用程序的最新版本进行编译有什么好处? https://docs .microsoft.com/en-us/xamarin/android/app-fundamentals/android-api-levels?tabs = vswin#framework

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

推荐答案

此答案适用于Visual Studio2017.如果使用的Xamarin Studio for mac,则必须寻找类似的选项.

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

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

这意味着该项目正在使用SDK 7.1,即Xamarin.Forms.Platform.Android.dll (vv7.1). 可能是您在项目设置中选择的Compile Using Android Version (Target Framework)低于v7.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.

如果将Android 7.1 Nougat设置为编译项目,则它将起作用. 您可以从Project Properties >> Application menu

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

此项目的最低android版本必须为7.0.

这表示您要在其上提供应用程序的最低Android OS版本.

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

可以在-

项目属性>> Android清单>>最低Android版本下拉列表

有关更多详细信息-请参阅下面的链接

For more details - refer below link

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

这篇关于Xamarin选择TargetFramework和MinimumAndroidVersion的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆