您的项目包含错误,请在运行之前进行修复 [英] Your project contains error(s), please fix it before running it

查看:113
本文介绍了您的项目包含错误,请在运行之前进行修复的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个简单的Android应用程序。但是当我运行Eclipse时,会显示以下错误:


您的项目包含错误,请在运行之前进行修复。 / p>

我的项目中找不到任何错误,或者我的应用程序没有错误。
应用程序名称下有一个红十字,但不在另一个文件名下。



有没有人有这个问题?

解决方案

通常来自构建路径中的错误。



如果您使用eclipse ,您可以添加一个视图,其中列出了所有问题错误:





否则,您可以尝试清理项目,这通常会解决一些问题。

最后,如果您从IDE外部添加或更改资源,则需要重新加载资源并清理。



编辑 (匿名用户评论)



这也可能是由于过期的调试证书固定如下:



如果所有的失败都是这个解决方案:



删除您的调试证书在〜/ .android / debug.keystore (在Linux和Mac OS X上);该目录是Windows上的%USERPROFILE%/。android



然后,当您下次尝试构建调试包时,Eclipse插件应生成新的证书。您可能需要清理然后构建以生成证书。



这也是setContentView(R.layout.main)的另一个修复程序。说它在实际生成时找不到R.layout.main的错误。 (R无法解析为变量)。



这也是错误您的项目有错误...的另一个修复,您找不到任何内容。
生成新的调试证书后,仍然需要清理和重建。


I am developing a simple Android application. But when I run Eclipse, it shows the following error:

Your project contains error(s), please fix it before running it.

I can't find any error in my project or there is no error in my application. There is a red cross under the application name but it is not under another file name.

Does anyone else have this issue?

解决方案

That usually comes from errors in the build path.

If you're using eclipse, there is a view you can add that lists all the errors called "Problems":

Otherwise, you can try to clean the project, and that usually solves a few problems.

Finally, if you add or alter resources from outside your IDE, you'll want to reload the resources and clean.

EDIT (Comment by anonymous user)

This can also be caused by an out of date "Debug Certificate" fixed as follows:

IF ALL FAILS THEN THIS GOTTA BE THE SOLUTION:

Delete your debug certificate under ~/.android/debug.keystore (on Linux and Mac OS X); the directory is something like %USERPROFILE%/.androidon Windows.

The Eclipse plugin should then generate a new certificate when you next try to build a debug package. You may need to clean and then build to generate the certificate.

This is also another fix for the "setContentView(R.layout.main);" error that says it cannot find R.layout.main when it is actually generated. (R cannot be resolved to a variable).

This is also another fix for the error "Your project has errors..." and you cannot find any. Clean and rebuild are still necessary after generating a new debug certificate.

这篇关于您的项目包含错误,请在运行之前进行修复的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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