简体   繁体   English

Xamarin(Android)Resource.Designer.cs生成的文件有错误

[英]Xamarin (Android) Resource.Designer.cs generated file has errors

I started a project and when I try to build I get 120 errors in the Resource.Designer.cs file. 我开始了一个项目,当我尝试构建时,我在Resource.Designer.cs文件中得到120个错误。

Error CS0117 'Resource.Color' does not contain a definition for 'design_textinput_error_color' 错误CS0117'Resource.Color'不包含'design_textinput_error_color'的定义

There are 120 similar errors to this one, 'x does not contain a definition for y' . 这个有120个类似的错误, 'x不包含y'的定义 I tried commenting them out but when I rebuild the file just gets regenerated and the errors return. 我试着将它们注释掉,但是当我重建文件时,只是重新生成并且错误返回。

Why does it not contain these definitions and how can I get it to create them? 为什么它不包含这些定义,我怎样才能创建它们?

将Numaet Manager中的Xamarin.Forms更新到最新版本可以解决错误。

You could try: 你可以尝试:

  1. Open up your Android SDK manager and Install the Android 6.0 (API 23). 打开Android SDK管理器并安装Android 6.0(API 23)。
  2. Update Target SDK to API level 23 将目标SDK更新到API级别23

Try cleaning your build and deleting the obj and bin folders. 尝试清理构建并删除obj和bin文件夹。

Have you seen this answer ? 你看到这个答案吗?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM