プログラミング学習日記

プログラミング学習時のメモ帳。

謎のエラー<未解決>

間違っている場所あったら優しく教えてね

The project was not built due to "Resource already exists on disk: '/sample/bin/.project'.". Fix the problem, then try refreshing this project and building it since it may be inconsistent

eclipseを使っていて以上のようなエラーが出てビルドができなくなてしまった.

実際に sample/bin/.project の中身を見てみると,

<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
    <name>src</name>
    <comment></comment>
    <projects>
    </projects>
    <buildSpec>
        <buildCommand>
            <name>org.eclipse.jdt.core.javabuilder</name>
            <arguments>
            </arguments>
        </buildCommand>
    </buildSpec>
    <natures>
        <nature>org.eclipse.jdt.core.javanature</nature>
    </natures>
</projectDescription>

このようになっていた. エラーメッセージに書いてあるのはResources already exists on diskResourcesがこの.projectファイルのことを指しているのかはわからない.
とりあえず.projectファイルを消してみる.
eclpseを一旦閉じてコマンド叩いて消してみました.

The project was not built due to "Resource already exists on disk: '/sample/bin/.project'.". Fix the problem, then try refreshing this project and building it since it may be inconsistent

しかしまだこのメッセージが残っています. 後のメッセージtry refreshing this projectをやってみる. わからないのでbin以下全て消してみることに

$ rm -r bin

どうだ!!!

The project was not built due to "Resource already exists on disk: '/sample/bin/.project'.". Fix the problem, then try refreshing this project and building it since it may be inconsistent

は消えなかった. わからなかった

ブログを見ていただきありがとうございました