【问题标题】:Xamarin deploy errorXamarin 部署错误
【发布时间】:2026-01-22 11:55:01
【问题描述】:

我正在尝试在我的 Sony ST23i(Android 4.0.3-API 15)上打开 this 应用程序。因此,我将“Minimum Android to Target”从“Android 4.3 API Level 18”更改为“Android 4.0.3 API Level 15”。但是现在我在尝试部署应用程序时遇到这些错误。

    The $(TargetFrameworkVersion) for FormsViewGroup.dll (v7.0) is greater than the $(TargetFrameworkVersion) for your project (v6.0). You need to increase the $(TargetFrameworkVersion) for your project. 

The $(TargetFrameworkVersion) for Xamarin.Forms.Platform.Android.dll (v7.0) is greater than the $(TargetFrameworkVersion) for your project (v6.0). You need to increase the $(TargetFrameworkVersion) for your project.

The $(TargetFrameworkVersion) for Xamarin.Forms.Platform.dll (v7.0) is greater than the $(TargetFrameworkVersion) for your project (v6.0). You need to increase the $(TargetFrameworkVersion) for your project. 

我无法从返回的 csproj 文件中将 TargetFrameworkVersion 增加到 6。如何在手机上运行此应用程序?

【问题讨论】:

  • “返回到 6”是什么意思?您能否详细说明如何更改“$(TargetFrameworkVersion)”以及通过哪些步骤返回到 6?
  • 在 android 的 csproj 文件中存在这一行。 v6.0 我改成了这个。 v7.0 但是当我用 Visual Studio 打开项目时,它又回到了 6.0

标签: xamarin xamarin.android target-framework


【解决方案1】:

在 android 的 csproj 文件中存在这一行。 <TargetFrameworkVersion>v6.0</TargetFrameworkVersion>我把它改成了这个。 <TargetFrameworkVersion>v7.0</TargetFrameworkVersion> 但是当我用 Visual Studio 打开项目时,它又回到了 6.0

您可以通过以下两个步骤更改TargetFrameworkVersion

  1. 右键单击您的项目->属性->应用程序选项卡。
  2. 将“使用 Android 版本(目标框架)编译”更改为 Android 7.0。

【讨论】: