c# - Xamarin 从 2.5 更新到 3.5 后,Xamarin.Forms.Platform.Android 不存在

标签 c# android .net xamarin xamarin.forms

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

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

到目前为止我尝试了什么:

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

最佳答案

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

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

关于c# - Xamarin 从 2.5 更新到 3.5 后,Xamarin.Forms.Platform.Android 不存在,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54591881/

相关文章:

android - 缓存 Android 应用程序数据,始终使用 getFilesDir() 是否安全?

android - 为什么我的 IntentService 不需要 WakeLock?

c# - 哪种数据结构适合临时存储大二进制数据?

c# - 为什么 C# ProcessStartInfoRedirectStandardOutput 会导致 xcopy 进程失败

c# - 用于验证百分比的正则表达式

c# - UIImageView 不在 Xamarin 上显示图像

c# - 如何从 dll 中的 Web 应用程序引用资源文件

c# - IMAP 搜索“字符

使用 Google Plus 登录安卓系统

C# - 遍历 Repeater 控件并访问通过 DataBinder.Eval() 添加的值