简体   繁体   English

R.java文件在清理时会自动删除

[英]R.java file automatically deleted on clean up

When i cleaned up my project my R.java file got deleted automatically. 当我清理项目时,我的R.java文件被自动删除。 My project has huge codes. 我的项目有很多代码。 I don't want to re-create my project and copy the codes into it. 我不想重新创建项目并将代码复制到其中。 I know the R.java file was deleted due to some error in resources. 我知道R.java文件由于资源错误而被删除。 I have huge data in resource(layouts, xml, strings.xml etc). 我的资源中有大量数据(布局,xml,strings.xml等)。 How to tract down which file in resource has the error. 如何减少资源中哪个文件出错。 Please help. 请帮忙。 Thank you 谢谢

当您再次重建项目时,将创建R.java。

R.java isn't meant to be manually edited. R.java并非要手动编辑。 It's automatically generated by the build process and can/will change even if the file is never deleted. 它是由构建过程自动生成的,即使从未删除过该文件,它也可以/将更改。

R.java文件将被自动重新生成。但是在此之前,您必须检查error in manifest ,xml and your java codes中是否存在错误。如果其中没有错误,请clean your project and rebuild.

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM