【发布时间】:2016-11-02 04:17:36
【问题描述】:
电脑规格
- Visual Studio 2015 企业更新 3
- Xamarin 4.2.0.719
- Xamarin.Android 7.0.1.6
- Xamarin.iOS 10.2.0.4
问题详情
Resource.designer.cs 未在 Xamarin.Droid 项目中更新。
- 试图删除
- 已尝试清理内容并重建
- 重启解决方案
- 重启电脑
- 创建新项目。
- 将文件重新添加为 Android 资源
- 试图删除 Resources.Designer.cs 文件
我尝试了以下所有帖子,我可能认为这是重复帖子:
Resource.designer.cs NOT regenerating in Mono (Xamarin Studio)
Adding new strings to resource.resx not reflecting into Designer.cs
Xamarin Resource.Designer.cs not refreshing new id's or events
- Resource.designer.cs NOT regenerating in Mono (Xamarin Studio)
- Resource.Designer.cs: "Resource ... does not contain a definition for ..."
- Hundreds of Resource.Designer.cs build errors on latest Xamarin Forms 2.2.0.45
- Xamarin Resource.designer.cs not generating reference for newly add file
- Xamarin.Droid: Resource.Designer.cs broken after update
- Why is Resource.Designer.cs not created
还尝试了 Xamarin 的官方链接:
我从 Codeproject 尝试了这个,上面写着 [已解决] 但对我自己也不起作用:
【问题讨论】:
-
您找到任何解决方案了吗?我也有同样的问题
-
是的。检查项目上的重复 ID。由于 Id 问题,未生成文件。有 2 个同名的 Id。
-
你的意思是资源文件里有id吗? (这应该不是问题吧?)还是您的意思是项目文件中的文件名?
-
两者都不是。我的意思是在 axml 文件中的 @+ids 中。如果有任何重复,它将使资源生成崩溃。例如:file1.axml 有一个 Id abc,而 file2.axml 有一个 Id abc。它会崩溃。
-
对我不起作用:/ 谢谢你的帮助!
标签: c# xamarin xamarin.android android-resources