eclipse 项目没有 project.properties 文件!编辑项目属性以设置一个错误
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/18582262/
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
Project has no project.properties file! Edit the project properties to set one error
提问by user2712795
I am getting the errors:
我收到错误:
Errors occurred during the build.
Errors running builder 'Android Resource Manager' on project 'DashboardActivity'.
java.lang.NullPointerException
and
和
[2013-09-02 17:55:31 - DashboardActivity] Project has no project.properties file! Edit the project properties to set one.
and
和
Description Resource Path Location Type
The type java.lang.Object cannot be resolved. It is indirectly referenced from required .class files UserFunctions.java /DashboardActivity/src/libary line 1 Java Problem
and
和
Description Resource Path Location Type
The project was not built since its build path is incomplete. Cannot find the class file for java.lang.Object. Fix the build path then try building this project DashboardActivity Unknown Java Problem
I have already tried cleaning the project and I get the same errors. Only the 'DashboardActivity' project is the one getting this error and my other projects work fine. In my properties Order and Export section there is a part that says "Unable to get system libary for this project" I know there should be a proper android.jar file here but I don't see one.
我已经尝试清理该项目,但遇到了相同的错误。只有“DashboardActivity”项目是出现此错误的项目,而我的其他项目工作正常。在我的属性 Order 和 Export 部分中,有一部分显示“无法为该项目获取系统库”我知道这里应该有一个正确的 android.jar 文件,但我没有看到。
Also, the android tools 'fix project properties' does nothing at all when I click on it.
此外,当我单击它时,android 工具“修复项目属性”根本不执行任何操作。
I have the AndroidManifest.xml file as well.
我也有 AndroidManifest.xml 文件。
Ever since I first went to clean my project it has created the file "proguard-project.txt" as well.
自从我第一次清理我的项目以来,它也创建了文件“proguard-project.txt”。
What can I do to fix this? Thanks in advance!
我能做些什么来解决这个问题?提前致谢!
NOTE: now I can't acess the gen folder or bin folder (there is no little + for me to click on to open it) and now it's saying that R cannot be resolved to a variable) ???
注意:现在我无法访问 gen 文件夹或 bin 文件夹(我没有一点点 + 可以点击打开它),现在说 R 无法解析为变量)???
Error while applying
申请时出错
回答by Trikaldarshi
Why don't you do this
你为什么不这样做
Right click on Project Root folder > properties > Java BuildPath > Library Tab
右键单击项目根文件夹 > 属性 > Java BuildPath > 库选项卡
Check whether any of library is missing (showing error with red cross) if yes then add this library to your project don't forget to CHECK it on Order and Export
检查是否缺少任何库(显示带有红色叉号的错误)如果是,则将此库添加到您的项目中不要忘记在订购和导出时检查它
Do one more thing
再做一件事
Right click on Project Root folder > properties > Android > set your Project Build Target
右键单击项目根文件夹 > 属性 > Android > 设置您的项目构建目标
check any one target
检查任何一个目标
Check your Android-sdk path from
检查您的 Android-sdk 路径
Window > Preference > Android
窗口 > 首选项 > Android
回答by Sandi Laufenberg-Deku
I was also having these errors:
我也有这些错误:
The project was not built since its build path is incomplete. Cannot find the class file for java.lang.Object.
该项目未构建,因为其构建路径不完整。找不到 java.lang.Object 的类文件。
and
和
The Project Properties Order and Export section has an error "Unable to get system library for this project"
项目属性顺序和导出部分出现错误“无法获取此项目的系统库”
I solved it by Right Clicking on the Project Root folder > properties > Android > set your Project Build Target and changed it to the highest target I could trust from working on other projects.
我通过右键单击“项目根文件夹”>“属性”>“Android”> 设置您的项目构建目标并将其更改为我可以信任的在其他项目上工作的最高目标来解决它。
It has been 3 years since I had this project working. So I noticed when I was troubleshooting tonight, that the manifest did not have a targetSdkVersion, only a minSdkVersion of "8". So I had changed that to this:
自从我开始这个项目以来已经 3 年了。所以我在今晚进行故障排除时注意到,清单没有 targetSdkVersion,只有“8”的 minSdkVersion。所以我把它改成了这样:
After doing the above 2 things, all my errors were gone -- however (!) ... a bit later tonight, I was trying to export my project to an .apk. And Eclipse crashed. Upon re-opening it, Eclipse is super broken. I am about to do a re-boot my PC now - and thus need to finish posting this. I trust Eclipse will be back to normal. But the reason I am mentioning this is that I suspect I may need to re-install Eclipse as I have been getting other minor start-up errors when I open Eclipse. And the errors I had tonight in that app were very strange and unusual.
完成上述两件事后,我所有的错误都消失了——但是(!)......今晚晚些时候,我试图将我的项目导出到 .apk。Eclipse 崩溃了。重新打开它时,Eclipse 是超级坏的。我现在要重新启动我的电脑 - 因此需要完成发布。我相信 Eclipse 会恢复正常。但我提到这一点的原因是我怀疑我可能需要重新安装 Eclipse,因为我在打开 Eclipse 时遇到了其他小的启动错误。我今晚在那个应用程序中遇到的错误非常奇怪和不寻常。