错误CS0103:名称“资源”在当前上下文中不存在

时间:2019-08-27 01:45:46

标签: android xamarin

使用Xamarin,当我编译项目时,会出现一堆错误,如标题中的错误。所有的错误错误都像这样在线发生:

LINE: var buttonLogin = FindViewById<Button>(Resource.Id.buttonLogin);
ERROR: error CS0103: The name 'Resource' does not exist in the current context

但是,这仅由thrown得到compiler,代码不是语法问题的下划线,我也可以在Resource.Id.buttonLogin上按f12并找到资源的生成代码

该代码可以正常工作,并且看起来不错,但是编译器不会停止抛出错误。

0 个答案:

没有答案