Xamarin.Droid: Resource.Designer.cs broken after update

≡放荡痞女 提交于 2019-12-01 22:31:11

问题


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.

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).

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'

With the code:

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.


回答1:


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

[EDIT] 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!



来源:https://stackoverflow.com/questions/36772611/xamarin-droid-resource-designer-cs-broken-after-update

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!