由网友(听我说“你狠烦”)分享简介:例如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.我已...
例如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.
相关推荐
最新文章