简体   繁体   English

Gradle构建完成,出现3个错误

[英]Gradle build finished with 3 errors

I am working on Android studio for quite a while and few days back I encountered a weird problem. 我在Android Studio上工作了一段时间,几天前我遇到了一个奇怪的问题。 While working on an app implementing a database, I clicked on run app to check, then the build stopped immediately and gave me an error gradle build finished with 3 errors . 在开发实现数据库的应用程序时,我单击了运行应用程序以进行检查,然后构建立即停止,并给了我一个错误gradle构建,其中包含3个错误

Another time, while the gradle was building the project, R.java class gets opened up in a new tab on its own and one of the variable's name gets an error. 还有一次,在gradle构建项目时, R.java类自己在新选项卡中打开,并且变量名之一出现错误。 Even though the screen showed that I should not tamper the R.java file contents. 即使屏幕显示我不应该篡改R.java文件的内容。

I tried renaming that mistyped variable to its correct name again (variable's correct name is et_linked_username and it showed et-linked-username in R.java class) and rebuilt the project but NOTHING WORKS, ITS ALL THE SAME. 我尝试再次将错误输入的变量重命名为其正确的名称(变量的正确名称为et_linked_username并且在R.java类中显示了et-linked-username ),并重新构建了项目,但没有任何效果,全部相同。

I believe something is wrong with the project itself, because its working absolutely fine on other projects. 我相信该项目本身存在问题,因为它在其他项目上的运行情况绝对良好。

I have included the image as a link below : 我将图像包含在下面的链接中: 在此处输入图片说明

You should never change the R.java file, its a system generated file. 您永远不要更改R.java文件,它是系统生成的文件。 Try to clean your project and rebuild it. 尝试清理您的项目并重建它。 You need to go to tools and access the options there. 您需要转到工具并在其中访问选项。

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

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