简体   繁体   English

在Android Studio中,R.java文件为空

[英]In Android Studio R.java file is empty

After opening my project in android studio its showing the following error 在android studio中打开我的项目后,显示以下错误

    "Gradle: Execution failed for task ':Results:processDebugResources'
     > Running /home/gopi/Desktop/android-studio/sdk/build-tools/android-4.2.2/aapt failed. See output"

And also R.java file is empty, I don't know wheather the above error is the reason or not. 而且R.java文件为空,我不知道上面的错误是否是原因。 My R.java is located in src/main/gen/com/example/results 我的R.java位于src / main / gen / com / example / results

please help me..... 请帮我.....

If R is not genereated correctly make sure none of ur java or xml files got error in them. 如果未正确生成R,请确保您的Java或xml文件均未出错。 Try Clean ur project. 尝试清理您的项目。

Really annoying error, I've just had a very similar thing and wanted to re-iterate the importance of checking your XML files for anything odd! 确实令人讨厌的错误,我刚刚遇到了一件非常类似的事情,并且想再次重申检查XML文件中是否有奇怪的错误的重要性! In the end mine was an activity that wasn't even in use anymore so going through and 'pruning' your project of obsolete files can help 最终,我的一项活动不再使用了,因此进行并“修剪”过时文件的项目可以为您提供帮助

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

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