Eclipse 错误:您的项目包含错误,请修复它们
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/9714883/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Eclipse error : Your project contains error(s),please fix them
提问by Joker
I am using Eclipse Classic 3.7.2 working only on Android. I use Ubuntu as my OS. When I run any basic Android application on Eclipse say "Hello World", it results an error called Your Project contains error(s), please fix them before running your application.
我使用的 Eclipse Classic 3.7.2 仅适用于 Android。我使用 Ubuntu 作为我的操作系统。当我在 Eclipse 上运行任何基本的 Android 应用程序时说“Hello World”,它会导致一个名为Your Project contains error(s), please fix them before running your application.
Now I have googled and checked hereand may others but I did not get the solution.
现在我已经在谷歌上搜索并检查了这里以及其他人,但我没有得到解决方案。
I also tried Project > clean...
but it isn't working.
我也尝试过,Project > clean...
但它不起作用。
Windows->Show Views->Problems
shows 2 errors:
Windows->Show Views->Problems
显示 2 个错误:
Error generating final archive: java.io.FileNotFoundException:/home/android/Desktop/helloworld/bin/resources.ap_does not exist.
Unable to parse aapt...
生成最终存档时出错:java.io.FileNotFoundException:/home/android/Desktop/helloworld/bin/resources.ap_does 不存在。
无法解析 aapt...
回答by Lucifer
回答by safe_malloc
Close and restart Eclipse. It works everytime !
关闭并重新启动 Eclipse。它每次都有效!
Its bug with deleting android projects I think.
我认为它删除了android项目的错误。
回答by Lalit Kumar Sahoo
I have faced exactly same type of issue. Just update your eclipse ADT plugin to latest version.
我遇到了完全相同类型的问题。只需将您的 eclipse ADT 插件更新到最新版本。
After update clean build the project.
更新后清理构建项目。
回答by Nezam
Go to your .android folder and delete your debug certificate. In my computer it is in this path
转到您的 .android 文件夹并删除您的调试证书。在我的电脑中它在这个路径中
E:\Users\(ur profyle)\.android
Inside that there is a file name 'debug.keystore'. Delete that,clean and try to build the project again. Sometimes this error is caused when the certificate expires.
里面有一个文件名“ debug.keystore”。删除它,清理并尝试再次构建项目。有时此错误是在证书过期时引起的。
回答by samsun
Set your Android sdk path once again and restart Eclipse. It fixes the issue (window-preferences-android-sdklocation).
再次设置您的 Android sdk 路径并重新启动 Eclipse。它解决了这个问题(window-preferences-android-sdklocation)。
Or, just update your Android tools and restart Eclipse works.
或者,只需更新您的 Android 工具并重新启动 Eclipse 即可。
回答by Srikanth Reddy Ramidi
Go to Project Properties -> Java Build Path
前往项目 Properties -> Java Build Path
Select Libraries and remove Android Dependencies
选择库并删除 Android 依赖项
After this my problem solved.
在此之后,我的问题解决了。
The error was because of updating
错误是因为更新
回答by noob
You need to update your Eclipse to the latest available version(Indigo) and then need to update the ADT(level 16 I think), as the latest ADT updates works on Indigo only. After the updates close and reopen the Eclipse, it should work now.
您需要将 Eclipse 更新到最新的可用版本(Indigo),然后需要更新 ADT(我认为是 16 级),因为最新的 ADT 更新仅适用于 Indigo。更新关闭并重新打开 Eclipse 后,它现在应该可以工作了。
回答by noob
Check your libs folder .. some libraries cause this , it happened to me once and i was use Apache POI .. i tried to delete the jars from libs folder and it's worked ..
检查你的 libs 文件夹 .. 一些库导致了这个,它发生在我身上一次,我正在使用 Apache POI .. 我试图从 libs 文件夹中删除 jars 并且它起作用了..
回答by oabarca
I had this problem in Eclipse after executing Project => Clean..
. That option deletes all the compiled stuff from your project and, therefore, the java classes start looking like if they all have errros.
执行后我在 Eclipse 中遇到了这个问题Project => Clean..
。该选项会从您的项目中删除所有已编译的内容,因此,java 类开始看起来好像它们都有错误。
To fix that problem I had to: 1. open my java clases and XML layout files(for android dev) 2. do a small change, something like a adding a space 3. Hitting Crt+S to ask eclipse to save and compile the class once again.
为了解决这个问题,我必须: 1. 打开我的 java clases 和 XML 布局文件(对于 android dev) 2. 做一个小的改变,比如添加一个空格 3. 点击 Crt+S 要求 eclipse 保存和编译再次上课。
This solution may or may not work for you. I recommend looking at your specific problems using the Problems tabof Eclipse (Found at Windows=>Show View=>Problems
) since it tells you about the exact errors and other very useful information.
此解决方案可能适合您,也可能不适合。我建议您使用Eclipse的问题选项卡(在 找到Windows=>Show View=>Problems
)查看您的具体问题,因为它会告诉您确切的错误和其他非常有用的信息。
回答by ikuchris
If you're using android support library make sure you have not added jar files ( android-support-v4.jarand android-support-v7-appcompat.jar) in your libs folder. you only need to add android-support-v7-appcompatas library on your project. It worked for me the time I had the same issue
如果您使用的是 android 支持库,请确保您没有在 libs 文件夹中添加 jar 文件(android-support-v4.jar和android-support-v7-appcompat.jar)。你只需要在你的项目中添加android-support-v7-appcompat作为库。当我遇到同样的问题时,它对我有用