在所有的类文件时出错,R不能得到解决 [英] Error in all the classes files: R cannot be resolved
本文介绍了在所有的类文件时出错,R不能得到解决的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
例如code:
setContentView(R.layout.main);
错误:
R cannot be resolved
有一个在所有的类文件,这个错误,我无法摆脱它。
There's this error in all the classes files, and I can't get rid of it.
我已经检查了XML文件,没有错误。
I already checked the XML files, there are no errors.
我已经确信,我不小心输入android.R。
I already made sure that I didn't accidentally import "android.R".
这个问题开始时,我试图清理和重建项目。
The problem started when I tried to Clean and Rebuild the project.
推荐答案
如果您已经更新了SDK工具,重新打开SDK管理器,在工具一节的Android SDK构建工具检查已安装并最终,更新它们。昨天做的伎俩我。
If you already updated the SDK tools, re-open the SDK manager and check under the "Tools" section that "Android SDK Build tools" are installed and eventually, update them. That made the trick for me yesterday.
这篇关于在所有的类文件时出错,R不能得到解决的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文