The project was not built since its build path is incomplete

泄露秘密 提交于 2019-11-27 17:47:40
Konstantin Pribluda

It seems that you lack JDK (java.lang.Object comes from there )

The problem is that you used the same Android API on different PC. Eclipse is lost with path names that are differents but with same API.

To solve it, first re-select Android API version (set to another one and valid, then restore the on you want and validate it -> it will force Eclipse to reload API). Then go into project->properties-> java build path. Then remove "Unable to get system library for the project" then "Add library" and select "Android Classpath container".

Right click on project -> Properties -> Java Build Path (From Left List) -> Libraries (Tab) -> Add Library (Button on right) -> JRE System Library -> Next -> Workspace default JRE -> Finish

This should solve at least one of your errors. Any others might require you to add further libraries.

Hope this helps.

Close eclipse and re-open worked for me. You may have to do this two or three times. Each time give it a minute for the auto build startup process (check bottom right hand corner) to complete, as these errors often disappear at this time.

Or try to clean the affected projects.

'Turn it off and on again'

Anup

Initially I was trying to import an android project from github and encountered the above problem

  • cannot configure build path

  • unable to get system libraries


Package Explorer -> Right click the project -> “Properties” -> "Android" -> "Project Build Target" = 2.3.3

Note: Also try Clean (On Windows: Project -> Clean) then Refresh (F5) at random. There's a good chance this will magically solve all your problems.


courtesy: KYLE CLEGG
reference link

Goto eclipse -> preferences -> java -> build path.

Do you see a JRE_LIB configured there? If not, add JRE_LIB from JDK/jre lib location. These can be overriden per project. It seems your eclipse isn't aware of Java libraries.

None of this worked for me. I created a new workspace for the projects. That worked for me! Switching to a new workspace usually miraculously solves a lot of these configuration problems. Simply create a new folder where you would want your new workspace to be and then use 'import project from existing code'.

I have seen such errors in past while importing projects in eclipse. The solution to that is to go to properties->Android and select project build target appropriately (Android x.x.x or Google APIs)

Was struggling with this while trying to load the Vuforia Sample App for way too long today. The solution that finally got my project to build was:

1) Window->Android SDK Manager and Install the latest updates
2) Project->Build Path->Configure Build Path->Android and under Project Build Target mark Android 4.4.2 and click OK
3) Clean, Build and Run

I hope this solves somebody else's issue as well, Eclipse is frustrating as F$#@!!!

I had to delete R.java in the gen folder then do a clean build. This solved my issue

Steve's answer does help for some Projects but still for some projects it remains the same, i guess projects previously build-in early JDK 1.5 (In my case). Found a workaround for them,

1.Find the class that causes the problem (Keep expanding the project in the Package Explorer).

2.Copy the class's contents after the import block.

3.Delete the whole class.

4.Right Click on the project then Android Tools>>Fix Project Properties

5.Create a class with same name under the same package the deleted class was before.(If the project is imported and the deleted class was an Activity/Service/Provider/Reciever then i guess the class is already included on the AndroidManifest.xml).

6.Paste the content of the class and Import packages.

7.Clean the project.

I've had similar problem. Exact same error, but in Ubuntu after I worked on project in dropbox folder from Windows. I've just added android.jar to project. Somehow it disappeared from build path.

For me this problem was related to OpenJDK 6 on Ubuntu.

Update your JRE or install Sun's proprietary JRE instead and restart Eclipse.

I know this is too late. but I am also facing this issue and I fix this by following below steps.

  1. This issue is occurred only if the project shared between different machines.
  2. For me I found java JDK is the problem.
  3. My colleague used mac system and using jdk 1.7. but in my system I used jdk 1.6.
  4. I guess that may be the issue. So I select project and open properties and change my jdk to 1.7
  5. Change target=Google Inc.:Google APIs:19
  6. Clean & Build

Finally issue is fixed. I think this is because of If you build your project with higher JDK version thereafter you should build with same version.

NOTE : we are not facing this issue before until my colleague build with JDK 1.7. After he started to using JDK 1.7 only this issue occur.

Hope it will work for some one. And no need for install new eclipse.

I had my "Build Automatically" turned off in "Project". I turned it off, because the Eclipse was not loading the projects correctly, for various unknown reasons. Turning this on, solved my problem.

if the project is not very big, you can copy the packages and paste it into a new project, you won't see the errors in the new project.

I was having target-18 in my project.properties. But I wasn't having android-18 sdk. So I changed 18 to some other version which I had in my SDK manager, and it fixed the issue.

You just exit eclipse once or twice to reload. It works for me.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!