Android的工作室突然无法解析标记R [英] Android studio suddenly cannot resolve symbol R

查看:178
本文介绍了Android的工作室突然无法解析标记R的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个项目在Android的工作室开放。它是由向导和工作的罚款产生的。

I was having a project open in Android studio. It was generated by the wizard and working fine.

我做了一些小的改动activity_main.xml,当我变回MainActivity.java我收到了好几处错误,它无法解决R.我可能做了一些导致此。但我不确定是什么,因为它appered当我编辑XML。

I did some small changes to activity_main.xml and when I changed back to MainActivity.java i get the error in several places that it cannot resolve R. I might have done something to cause this. But I´m not sure what since it appered when I edited the xml.

有谁知道可能是什么解决办法? 我能找到的R.java在R /发行/ packege / COM /它看起来很好。

Does anyone know what might be the solution to this? I can find the R.java in r/release/packege/com/ and it looks fine.

推荐答案

在大多数情况下是由于坏的XML文件。 XML文件可以布局文件,值文件,或清单文件。请检查您的XML文件,并尝试重建项目。有时清洗项目和重建它也可以。

Most of the time it is due to a bad XML file. XML files can be layout files, value files, or the Manifest file. Please check your xml files and try to rebuild the project. Sometimes cleaning the project and rebuilding it also works.

这篇关于Android的工作室突然无法解析标记R的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆