Netbeans 8.0.2 impl-dif.xml file error "Unable to delete file..." in ..\build\classes folder
<p>After successfully compiling and cleaning and building many times today, suddenly I have this Netbeans 8.0.2 error:</p>

<pre><code>Unable to delete file C:\Users\Dov\Google Drive\NetBeansProjects\
                      WordyHelperton\build\classes\dictionary.dic
</code></pre>

<p>Here's my clean and build output:</p>

<pre><code>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)
</code></pre>

<p>The line where the error occurred in <code>build-impl.xml</code> is <code>delete ... build.dir...</code>:</p>

<pre><code>&lt;target depends="init" name="-do-clean"&gt;
    &lt;delete dir="${build.dir}"/&gt;
    &lt;delete dir="${dist.dir}" followsymlinks="false" includeemptydirs="true"/&gt;
&lt;/target&gt;
</code></pre>

<p>And here's what Windows Explorer has to say about it:</p>

<p><a href="https://i.stack.imgur.com/sspQ8.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/sspQ8.png" alt="enter image description here"></a></p>

<p>Task Manager showed no processes named java... or netbeans... or nb...</p>

<p>Tried to delete: "You need admin privileges". No can do.</p>

<p>How to fix this?</p>

<p><em>EDIT</em></p>

<p>Rebooting caused the files with red X to disappear AND THE FOLDER <code>classes</code>, BUT NOW THERE'S A NEW ERROR:</p>

<pre><code>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)
</code></pre>

<p>And here's the directory structure:</p>

<p><a href="https://i.stack.imgur.com/TknLu.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/TknLu.png" alt="enter image description here"></a></p>

<p>Here's the line being executed:</p>

<pre><code>&lt;target depends="init,-deps-jar-init" name="deps-jar" unless="no.deps"&gt;
    &lt;mkdir dir="${build.dir}"/&gt;
</code></pre>

<p>There's no <code>build</code> and no <code>dist</code> folder.</p>

<p>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.</p>