Java 错误:项目未构建,因为其构建路径不完整
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/28453509/
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
Error:The project was not built since its build path is incomplete
提问by Neha Dixit
My adt work one time very well and i am able to run all the projects and then open in next day it wants some updates for sdk otherwise show error of DDMS missing i updated the sdk and now
Error: 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
Do any one tell me how to solve all these errors and work on ADT smoothly or there any other option.
我的 adt 一次工作得很好,我能够运行所有项目,然后在第二天打开它需要一些 sdk 更新,否则显示 DDMS 丢失的错误我更新了 sdk,现在错误:资源路径位置类型该项目不是由于其构建路径不完整而构建。找不到 java.lang.Object 的类文件。修复构建路径然后尝试构建这个项目
有人告诉我如何解决所有这些错误并顺利地处理 ADT 或有任何其他选择。
采纳答案by Ankit Khare
The problem here is your IDE couln't recognise your SDK location, if you are using MyEclipse the do following
这里的问题是您的 IDE 无法识别您的 SDK 位置,如果您使用的是 MyEclipse,请执行以下操作
- Go to Windows -> preference -> Android and set your sdk path again.
- In Studio File -> setting and then set your sdk path.
- 转到 Windows -> 首选项 -> Android 并再次设置您的 sdk 路径。
- 在 Studio File -> setting 中,然后设置您的 sdk 路径。
Then restart eclipse/studio.
然后重新启动eclipse/studio。
回答by Alan Barrows
Seems you are missing Java itself within the IDE which include java.lang.Object
. I'd check to see if the project you are working with has Java on the build path.
似乎您在 IDE 中缺少 Java 本身,其中包括java.lang.Object
. 我会检查您正在使用的项目是否在构建路径上有 Java。