Sources directory is already netbeans project (maybe only in memory).
This error happened to me a few times, and today i found the solution.
Apparentlyit was caused because when trying to add a project to Netbeans, it was creating metadata files and saved them on a fixed location (which was based on the data found in the nbproyect folder)
…so to solve this, i just had to change the location of the creation of this files by checking the box below (i just checked that box and the problem was solved for me, i didn’t had to chose any directory):

Saurabh 8:33 AM on 26 March 2012 Permalink |
I searched all over for a solution for this. Tried several solutions from stackoverflow and all and restarted netbeans several times. nothing worked. Thanks for sharing.
Saurabh 3:44 AM on 8 February 2013 Permalink |
You need to remove ‘nbproject’ directory within your folder structure which is created by NetBeans itself. Once you delete that, you are able to add your project.
Thanks.