After successfully compiling and cleaning and building many times today, suddenly I have this Netbeans 8.0.2 error:
Unable to delete file C:\Users\Dov\Google Drive\NetBeansProjects\
WordyHelperton\build\classes\dictionary.dic
Here's my clean and build output:
ant -f "C:\\Users\\Dov\\Google Drive\\NetBeansProjects\\WordyHelperton" -Dnb.internal.action.name=rebuild clean jar
init:
deps-clean:
Updating property file: C:\Users\Dov\Google Drive\NetBeansProjects\WordyHelperton\build\built-clean.properties
Deleting directory C:\Users\Dov\Google Drive\NetBeansProjects\WordyHelperton\build
C:\Users\Dov\Google Drive\NetBeansProjects\WordyHelperton\nbproject\build-impl.xml:1397:
Unable to delete file C:\Users\Dov\Google Drive\NetBeansProjects\WordyHelperton\build\classes\dictionary.dic
BUILD FAILED (total time: 1 second)
The line where the error occurred in build-impl.xml
is delete ... build.dir...
:
<target depends="init" name="-do-clean">
<delete dir="${build.dir}"/>
<delete dir="${dist.dir}" followsymlinks="false" includeemptydirs="true"/>
</target>
And here's what Windows Explorer has to say about it:
Task Manager showed no processes named java... or netbeans... or nb...
Tried to delete: "You need admin privileges". No can do.
How to fix this?
EDIT
Rebooting caused the files with red X to disappear AND THE FOLDER classes
, BUT NOW THERE'S A NEW ERROR:
ant -f "C:\\Users\\Dov\\Google Drive\\NetBeansProjects\\WordyHelperton" -Dnb.internal.action.name=rebuild clean jar
init:
deps-clean:
Updating property file: C:\Users\Dov\Google Drive\NetBeansProjects\WordyHelperton\build\built-clean.properties
Deleting directory C:\Users\Dov\Google Drive\NetBeansProjects\WordyHelperton\build
clean:
init:
deps-jar:
C:\Users\Dov\Google Drive\NetBeansProjects\WordyHelperton\nbproject\build-impl.xml:896: Directory C:\Users\Dov\Google Drive\NetBeansProjects\WordyHelperton\build creation was not successful for an unknown reason
BUILD FAILED (total time: 1 second)
And here's the directory structure:
Here's the line being executed:
<target depends="init,-deps-jar-init" name="deps-jar" unless="no.deps">
<mkdir dir="${build.dir}"/>
There's no build
and no dist
folder.
My question remains: How did all this happen in the first place? It cost me an hour and I'd like to know how to prevent it.
I had a similar problem. My Java folder is synchronized with Google Drive cloud. According to the above screenshots, you also seem to use a kind of synchronization service. First time, I had to reboot the computer to fix the issue. Second time, I tried to first stop Google Drive. Then I rebooted NetBeans only (not the computer), and it was OK.