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

2020-04-08 14:51发布

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条回答
The star\"
2楼-- · 2020-04-08 14:53

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!

查看更多
登录 后发表回答