Why “no projects found to import”?

后端 未结 11 1663
臣服心动
臣服心动 2020-12-02 04:39

I am trying to \"import existing project into workspace\". As the \"root directory\" I select the directory where all my .java (and .class) files are located. Eclipse writes

相关标签:
11条回答
  • 2020-12-02 05:04

    If you don't have I just have .project and .classpath files in the directory, the only way that works (for me at least) with the latest version of Eclipse is:

    1. Create a new Android project
      • File -> New -> Project... -> Android -> Android Application Project -> Next >
      • Fill in the values on this page and the following according to your application's needs
    2. Get your existing code into the project you just created
      • Right click the src file in the Package Explorer
      • General -> File System -> Next >
      • Browse to your project, select the necessary files, hit Finish

    After this, you should have a project with all your existing code as well as new .project and .classpath files.

    0 讨论(0)
  • 2020-12-02 05:07

    After a long time finally i found that! Here my Way: File -> New Project -> Android Project From Existing Code -> Browse to your project root directory finish!

    0 讨论(0)
  • 2020-12-02 05:15

    In order to resolve this problem for android projects. follow the below mentioned steps new->android project->create project from existing source and in this you can give your code location. Now, it will import all the specified project code and will work fine

    0 讨论(0)
  • 2020-12-02 05:20

    Eclipse is looking for eclipse projects, meaning its is searching for eclipse-specific files in the root directory, namely .project and .classpath. You either gave Eclipse the wrong directory (if you are importing a eclipse project) or you actually want to create a new project from existing source(new->java project->create project from existing source).

    I think you probably want the second one, because Eclipse projects usually have separate source & build directories. If your sources and .class files are in the same directory, you probably didn't have a eclipse project.

    0 讨论(0)
  • 2020-12-02 05:20

    if you are building a maven project through a command console, make sure the following is at the end of the command:

    eclipse:eclipse -Dwtpversion=2.0
    
    0 讨论(0)
  • 2020-12-02 05:23

    I had the same issue when I've modified .project xml-file. When I reverted files to original version the project was created, then I was able to import project. Maybe it helps someone who has the same kind of problem ;)

    0 讨论(0)
提交回复
热议问题