How to import java project (Eclipse)
I have tried importing a .zip project through eclipse by right clicking the project and selecting import, then navigating to the zip folder on my desktop and there we go. If i do this, i get a red exclamation mark next to the project name, which after googling i found was because of an error with the build path.
The .zip was created from my bosses machine and emailed to me, however he is not in the office today and i am only a placement student so i have pretty much no idea how to fix this.
Does anyone have any tips/ help they can provide me. Thank开发者_JS百科s
The import was correct. Fixing build path errors is a common task after importing projects.
You'll have to look at the build path settings for this project and have to find out, which libraries are missing and dependencies are unresolved.
Right-click on the project name, --> Build Path --> Configure Build Path...
Check Projects and Libraries Tab, the reason for the red exclamation mark is in there.
You have to get rid of the build path errors, otherwise eclipse can't build the project. Either provide valid paths for all libraries or delete classpath entries.
The should remove that exclamation mark and eclipse can build the project. But removing classpath entries most likely results in compile errors or runtime errors, if the application can't find external configuration files or so.
In your special case: Looks like the project depends on other projects (we see that quite often in eclipse) and it could be, that your boss did not give you all projects or your eclipse is not setup correctly (maybe your workspace should contain some default projects with default libraries). Ask co-workers, they may give a hint on that.
Right click on your project, then select "build path", then "configure build path". There will probably be errors in "libraries" tab. Examine them and try to fix them. For example, your boss might have a different JRE (Java Runtime Environment) path than you do.
Go to 'configure build path' > android > select a target which will be available there. if this doesn't work then copy the 'lib' folder of any other project and paste it in your project. this will work together with target selected.
精彩评论