gen already exists but is not a source folder

前端 未结 15 1078
深忆病人
深忆病人 2020-12-22 23:37

I am developing my Android project, After I removed a unused library, I got the error:

myproject/gen already exists but is not a source fold         


        
相关标签:
15条回答
  • 2020-12-23 00:07

    I get the same problem.

    Two actions, first:

      1.Right click on the project and go to "Properties"
      2.Select "Java Build Path" on the left
      3.Open "Source" tab
      4.Click "Add Folder..." and check "gen" and "src"

    second: (because the previous action asked me to remove something... I do not remember what it was...)

      1. Right click on the project and go to "Properties"
      2. Select "Java Build Path" on the left
      3. Open Libraries "tab"
      4. Add an external JAR. Add the Google API that is in your android directory (android-sdk\platforms\android-yourversion

    And now it works for me!

    0 讨论(0)
  • 2020-12-23 00:10

    I had SVN configured for a project with the same problem, deleted all folders and files, retrieved it again from SVN and still no luck. The only thing that helped was reverting the changes, and deleting/re-importing projects to the workspace. Hope this helps

    0 讨论(0)
  • 2020-12-23 00:15

    The last time I had this issue, it was because I switched the source to another branch behind the scenes. Once I closed Eclipse and relaunched, the issue went away.

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