Xamarin.Droid:Resource.Designer.cs 更新后损坏 [英] Xamarin.Droid: Resource.Designer.cs broken after update

查看:25
本文介绍了Xamarin.Droid:Resource.Designer.cs 更新后损坏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 Xamarin for Android 并且我正在使用支持库.该项目工作正常,但在将支持存储库从 23.1.1.1 更新到 23.3.0 后,Resource.Designer.cs 损坏了.

I'm using Xamarin for Android and I'm using the support libraries. The project work fine, but after updating the support repositories from 23.1.1.1 to 23.3.0, the Resource.Designer.cs is broken.

注意:我确实删除了文件,我通过手动删除了 objbin 文件夹进行了完整的重建,并且我确保我的所有 Android 包都达到日期(Android SDK 管理器).

Note: I did delete the file, I did a complete rebuild with manually deleting the obj and bin folders and I made shure all of my Android packages are up to date (Android SDK Manager).

错误都是public static void UpdateIdValues()函数的一部分,基本上都是这样的:

The errors are all part of the public static void UpdateIdValues() function all basically all look like this:

'Resource.Color' does not contain a definition for 'design_textinput_error_color'

使用代码:

global::Acr.UserDialogs.Resource.Color.design_textinput_error_color = global::EVM.Droid.Resource.Color.design_textinput_error_color;

任何想法,这个错误来自哪里以及如何解决它?感谢您的帮助.

Any Idea, where this error is coming from and how to fix it? Thanks for your help.

推荐答案

同样的问题,visual studio comunity 2015,似乎是版本问题,这是一个旧的资源定义,现在已经被_dark和_light取代.目前要解决的问题是,我添加了从深色版本复制它们的缺失值.似乎 Xamarin 包含一些旧版本(例如 API 22)而不是最新版本(API 23)弗拉维奥

Same issue, with visual studio comunity 2015, it seems to be a version problem, this was an old resorce definition, that now has been substituted with _dark and _light. At the moment to solve I've added the missed values copying them from the dark version. Seems that Xamarin includes some old version (e.g API 22) instead of the latest one (API 23) Flavio

找到另一个快速解决方案,从 .droid 项目的 nuGet 包管理器中删除所有已安装的包,然后添加与 xamarin 相关的最新可用版本(我已经用户 power shell 按照依赖关系从xamarin https://www.nuget.org/packages/Xamarin.Forms/)构建所有......这就是诀窍!

Find another quick solution, from nuGet package manager of the .droid project remove ALL the installed packages, then add the latest available release of xamarin related (I've user power shell adding them one by one in order of dependency from the nuget page of xamarin https://www.nuget.org/packages/Xamarin.Forms/) Build all...and this does the trick!

这篇关于Xamarin.Droid:Resource.Designer.cs 更新后损坏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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