Kevin Lee
Kevin Lee

Reputation: 1089

Sources directory is already NetBeans project error

i got that error and i can't add project in netbeans.. please teach me how to fix this

even if i rename my folder it doesn't work...

Upvotes: 15

Views: 26825

Answers (6)

olecom
olecom

Reputation: 1

This happen to me on MS Windows as well. Cause was netbeans.conf's

netbeans_default_options="-J-Dline.separator=LF"

Upvotes: 0

I had a PHP project with maven pom.xml, with no nbproject directory and clear cache, and netbeans would refuse to create a new project from sources with that pom.xml in place. Had to remove pom.xml, create a project and put pom.xml back.

Upvotes: 7

Mohammad Faisal
Mohammad Faisal

Reputation: 5959

Instead of creating it as a New Project try Open Project if nbproject directory exists in your project root directory.

Upvotes: 3

jitu99
jitu99

Reputation: 201

Delete the nbproject folder in your project directory and restart the IDE.

Upvotes: 20

Pietro
Pietro

Reputation: 13172

I fixed the problem with:

rm -r ~/.cache/netbeans
rm ~/.netbeans/.superId

Upvotes: 3

Matt Handy
Matt Handy

Reputation: 30025

Netbeans tries to add a folder (nbproject) to your project during import. If it is already there NB fails to add it. Move the existing nbproject folder to a different directory outside your project and try to import again.

See this question.

Upvotes: 24

Related Questions