I’ve been playing around with Android now and so far it’s been a good experience save one really annoying thing.
Project ‘Project Name’ is missing required source folder: ‘gen’
Seriously?! I mean come on, the folder is in the project for crying out loud! Sadly I’m not the only one who has been plagued by this error. Many Google searches later and still no hard-fast answer that. I have found one thing that seems to help although it’s a pain to keep doing it over and over again….
- Delete the R.java file under the gen folder
- Refresh the project
- Build Project, not Clean
This, so far, seems to be the only way to consistently get rid of the missing gen folder message….
Edit:
It seems I’m getting more and more traffic to this post. Christian provided the correct fix below on how to resolve the missing GEN folder in the comments below. Set the Java version of the project to 1.6 and you’ll be troubled no more. Thanks Christian.
Hey,
setting the java version in project settings solved this issue for me.
Cheers Christian
Hey,
setting the java version in project settings to 1.6 solved this issue for me.
Cheers Christian
Try editing a file and saving it.
Source: http://www.coderanch.com/t/466092/Android/Mobile/android-eclipse
adding “gen” to source folders in Java preferences will probably resolve the problem..
Christian has it right.
Use Project > Properties > Java Compiler > JDK Compliance > Compiler compliance level: 1.6
Thanks, Christian!
After creating the android project, eclipse is not building it.
Just modifify any java file to trigger a build.
I guess you could just do a “project clean/build all” or something like that.
The comment here seems to provide solution to the problem
I installed the Eclipse/Android SDK/Java SDK with default settings.
I don’t have the “missing ….’gen’” problem until I moved some codes from other BlackBerry project. Before it, the Android codes build/run simulator without any problem.
The “editing code and save” and “delete ‘gen’ folder” doesn’t work for me.
But the “Delete the R.java file under the gen folder” does solve my problem.
I changed the compliance level to 1.6 still it doesnt work. However manually creating gen folder solves the problem.
Thanks for the tip! I even had to change from 1.6.0 to 1.6 in OS X in order to get it to work.
Right click on project name in the package explorer. Go to properties. In properties go to Java Build Path. In Java Build Path go to Order and Export and check all the checkboxes available. That should solve the problem. Regards, Shomik.