The project was not built since its build path is incomplete

前端 未结 18 1320
一向
一向 2020-12-04 15:29

Every time I try to import a project downloaded from googlecode into Eclipse but I get some errors:

The project was not built since its build

相关标签:
18条回答
  • 2020-12-04 15:44

    Steve's answer does help for some projects, but still, for some projects, it remains the same. I guess that projects were previously build-in early JDK 1.5 (in my case). But I 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 the 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, I guess the class is already included in the AndroidManifest.xml).
    6. Paste the content of the class and import packages.
    7. Clean the project.
    0 讨论(0)
  • 2020-12-04 15:52

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

    0 讨论(0)
  • 2020-12-04 15:54

    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.

    0 讨论(0)
  • 2020-12-04 15:55

    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.

    0 讨论(0)
  • 2020-12-04 15:56

    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 overridden per project. It seems your eclipse isn't aware of Java libraries.

    0 讨论(0)
  • 2020-12-04 15:56

    I encountered with the similar problem..... Make sure that

    1. You create your project within your workspace. If your project is not in the default workspace where .metadata folder within which other plugin folders, and etc. will be present, then it will ask you to configure build path as the project is not build because of incomplete build path.

    If the first step is clear, then go for this.....

    1. Right click on your project -> build path -> configure build path -> libraries -> Add libraries -> JRE system libraries -> Apply and close.
    0 讨论(0)
提交回复
热议问题