In every instance in all of my classes where I reference R.id.something
, the R
is in red and it says "cannot resolve symbol R".
(在我引用R.id.something
所有类的所有实例中, R
均为红色,并显示“无法解析符号R”。)
Also every time there is R.layout.something
it is underlined in red and says "cannot resolve method setContentView(?)". (同样,每次有R.layout.something
它都会用红色下划线表示“无法解析方法setContentView(?)”。)
The project always builds fine. (该项目始终可以正常运行。)
It is annoying to see this all the time. (一直看到这很烦人。)
I have read many other questions on here about something similar but most involved importing projects from Eclipse. (我在这里阅读了许多其他问题,这些问题与相似但最涉及从Eclipse导入项目有关。)
I am using what I believe to be the most recent version of Android Studio and the project was created with Android Studio and worked without any "cannot resolve R" problems. (我使用的是我认为是Android Studio的最新版本,并且该项目是使用Android Studio创建的,并且可以正常工作而没有任何“无法解决R”问题。)
I would like to know what causes this if anyone knows. (如果有人知道,我想知道是什么原因造成的。)
ask by ez4nick translate from so 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…