Eclipse Android gen already exists but is not a source folder

后端 未结 4 1999
走了就别回头了
走了就别回头了 2021-01-12 03:11

I am getting the following errors when I try to load an Android project in Eclipse that was working just fine last week. Any ideas?

[2012-03-16 09:29:43 - My         


        
相关标签:
4条回答
  • 2021-01-12 03:41

    right click on project and go to project properties, then goto java build path, and then in source tab, click on add folder button and add gen folder. just src and gen folders should be checked there if you haven't any library projects attached.

    0 讨论(0)
  • 2021-01-12 03:46

    This happens because your .classpath file got wiped out somehow. This file contains all the information from the Java Build Path tab under Project Properties. You could add in all information manually but there's an easier way of fixing this problem.

    If you have a copy of the .classpath file on your machine, you can just copy and paste it into your project directory.

    0 讨论(0)
  • 2021-01-12 03:47

    Follow these steps in Eclipse : Project -> Properties -> Select Java Build Path -> Open Source tab -> Click Add Folder and check the gen

    0 讨论(0)
  • 2021-01-12 03:52
    MyProject] /MyProjectName/gen already exists but is not a source folder. Convert to a source folder or rename it
    

    This problem happens when eclipse does not able to find each linked contents in a project.

    For example:

    When we import a project to eclipse from a specific folder(suppose D://NewFolder), eclipse memorized and link each content with its appropriate path (which is D://NewFolder/project_library/src in our example).

    But if we replaced(Here D://NewFolder To E://Another_Folder) or delete the library from its specific folder(Here D://NewFolder), eclipse unable to find its(project_library) original path and give red error.

    So when this problem happens, first we have to make sure that the imported project or library is its original folder and no changes has made to this.

    Otherwise again replace the project to its specific folder to which eclipse has linked at the time of import i.e parent folder.

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