Xamarin 从 2.5 更新到 3.5 后 Xamarin.Forms.Platform.Android 不存在 [英] Xamarin.Forms.Platform.Android does not exist after Xamarin update from 2.5 to 3.5

查看:23
本文介绍了Xamarin 从 2.5 更新到 3.5 后 Xamarin.Forms.Platform.Android 不存在的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已将我的项目 Xamarin.Forms NuGet 包从 2.5 版更新到 3.5 版.此更新后,我的 Android 项目出现错误:

I have updated my projects Xamarin.Forms NuGet package from version 2.5 to 3.5. After this update I got an error in my Android project saying:

命名空间中不存在类型或命名空间名称Android"'Xamarin.Forms.Platform'(您是否缺少程序集参考?)

The type or namespace name 'Android' does not exist in the namespace 'Xamarin.Forms.Platform' (are you missing an assembly reference?)

到目前为止我尝试过的:

What I've tried so far:

  • 删除 bin、obj 文件夹
  • 关闭并重新打开解决方案
  • 清理和重建解决方案
  • 重新安装 Xamarin Forms NuGet

推荐答案

@Jaymin 是对的.您必须确保安装的 Xamarin.Android 的版本应与您添加到当前项目的版本相同.

@Jaymin is right. You must make sure that the version of the installed Xamarin.Android should be as same as the version that you have added to the current project.

例如,如果您安装了 Xamarin.Android 的 v27.0.2.1,则不能将您的项目仅升级到 v28.0.0.1.您应该先升级与 Visual Studio 一起安装的组件(Xamarin.Android).

For example, if you have installed v27.0.2.1 of Xamarin.Android, you can not upgrade your project to v28.0.0.1 only. You should upgrade the component(Xamarin.Android) which is installed with Visual Studio first.

这篇关于Xamarin 从 2.5 更新到 3.5 后 Xamarin.Forms.Platform.Android 不存在的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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