65

I downloaded the FBReaderJ source, its say: " /FBReaderJ/gen already exists but is not a source folder. Convert to a source folder or rename it"

I can't run it, why? I can't delete "gen" too.

lacas
  • 13,928
  • 30
  • 109
  • 183

5 Answers5

213

Try this, it helped me:

  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..."
  5. Check "gen" folder and click Ok and Ok again
  6. Again right click on the project and in the "Android Tools" click on "Fix Project Properties"
rmtheis
  • 5,992
  • 12
  • 61
  • 78
Jonauz
  • 4,133
  • 1
  • 28
  • 22
  • 2
    This is the 5th such error from eclipse in one week. One can see why Google are moving their attentions towards Google Studio. – Andrew S May 31 '13 at 19:22
  • Well, I kind of moved to iOS/Xcode just because of Eclipse. I don't want to offend any one, but I personally dislike Eclipse. It tries to do everything in one app, and there for there is so many crashes, malfunctions and etc. Tried to understand for so long why Google can't invest in Android specific editor, which could be an awesome thing for any dev. – Jonauz Jul 06 '13 at 11:18
  • I screwed up things and everything in eclipse was..weird. Literally broke down in tears. Thanks for this response. so much – Da-Jin Feb 08 '14 at 01:43
9

There are several things I do to fix that.

  • Delete the gen folder
  • Use project > clean
  • Properties > android tools > fix project properties
Nallath
  • 2,100
  • 20
  • 37
  • nothing helped...Errors occurred during the build. Errors running builder 'Android Resource Manager' on project 'FBReaderJ'. Errors running builder 'Android Pre Compiler' on project 'FBReaderJ'. java.lang.NullPointerException – lacas May 31 '11 at 09:57
  • I just had that yesterday. Does your project have a .classpath file? The best thing you can do is create your own (new) project and copy the files of that project into it. – Nallath May 31 '11 at 10:00
  • where is the .classpath file? If I create a new project, and then copy all the files in there, this coming up the later error again..:( – lacas May 31 '11 at 10:42
  • .classpath file is a hidden file. I'm using Ubuntu, so i'm not sure if the problem can be solved in the same way on windows/mac. – Nallath May 31 '11 at 11:19
  • I'm not sure which of these worked, but it seems that doing all three fixed my problem. (Same problem, different app.) – sage Jul 19 '11 at 20:41
  • Same problem, none of the 3 solutions worked. What finally worked is replacing the .classpath with one from my working projects. – Theo Jul 25 '11 at 21:21
1

Simpley it means your project is not in workspace again import the project

sharma_kunal
  • 2,152
  • 1
  • 28
  • 28
1

Try creating a new Android project in your Eclipse IDE, then copying the hidden .classpath file from the new project into your existing one. You can then delete the extra Android project.

Then do the steps above. Delete the /gen folder, and do cleaning (Project -> Clean, Android Tools -> Fix Project Properties).

The issue for me was that the downloaded .classpath was set to place the source .class files into /gen, which was supposed to have R.class files. Eclipse wanted the source .class files in /bin, which is what Eclipse's automatically generated .classpath gives you. If you feel comfortable editing the .classpath yourself (it's not particularly difficult to read), you can make the modifications in-place without bothering to create a new Android project.

Talos
  • 147
  • 2
  • 6
0

Go to Project -> Properties -> Java Compiler. Select 'Compiler compilance level' to 1.6+. If you don't have higher compiler versions available, you may be running on an old Java installation, get it updated

Achin Kumar
  • 777
  • 6
  • 11