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):