简体   繁体   中英

Eclipse Imports Project Incorrectly

I am attempting to import a project that is originally a Git repo. I ran the git clone command to pull down the code into the workspace. Now when I right click->import existing android project and import the project eclipse imports it without displaying any errors. However when it imports it all of the classes are moved to a classes directory (as opposed to src) and there are no packages in src. When I go in the classes directory and select a class it opens the Class File Editor and reads "Source not found".

Some extra detail : The classes directory is compiled java bytecode. However if I navigate into my workspace manually and open the .java file with a text editor the source code is directly there. In fact the classes directory does not exist, everything is organized as normal in the workspace. But its eclipse that compiles and creates the classes directory on import.

I have searched SO and couldn't find anything similar, though I feel like someone would have run into this before.

How can I correctly import the project?

Thanks

Instead of using import existing android project, use the import 'existing projects into workspace' option. Use the general import that doesn't say "android", in other words.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM