2016-04-28 4 views
4

突然電源が一瞬切れたときにAndroidスタジオに座ってコード化しました。今、私は私のアプリを実行する/構築しようとするたびに、私はこのGradleのエラーを取得:停電後、もうアプリケーションをコンパイルできません

Error:org.gradle.api.internal.changedetection.state.DefaultFileCollectionSnapshotter$FileCollectionSnapshotImpl cannot be cast to org.gradle.api.internal.changedetection.state.OutputFilesCollectionSnapshotter$OutputFilesSnapshot Possible causes for this unexpected error include:

  • Gradle's dependency cache may be corrupt (this sometimes occurs after a network connection timeout.) Re-download dependencies and sync project (requires network)
  • The state of a Gradle build process (daemon) may be corrupt. Stopping all Gradle daemons may solve this problem. Stop Gradle build processes (requires restart)
  • Your project may be using a third-party plugin which is not compatible with the other plugins in the project or the version of Gradle requested by the project.
In the case of corrupt Gradle processes, you can also try closing the IDE and then killing all Java processes.

私はまだ、このエラーを取得し、&再起動私のキャッシュを無効にしようとした清潔で、プロジェクトのserveral回を再構築してきました。それが働いているため

+2

あなたのホームディレクトリの '.gradle'ディレクトリを削除しようとすることができます –

+0

... UPSを購入するか、ラップトップで開発します(バッテリはUPSとして動作します)。 –

+0

これは問題を解決するようでした!ありがとう! – Baxtex

答えて

4

私はここに私のコメントをコピー:

あなたのホームディレクトリにディレクトリ.gradleを削除しようとすることができます。

rm -rf ~/.gradle/(LinuxまたはOSXシステム用)
RD /S /Q "%USERPROFILE%\.gradle\"(Windows用)

+1

注記!プロジェクトディレクトリ内の.gradleフォルダを、ホームディレクトリ内の.gradleフォルダなしで削除します。 – DLastCodeBender

+0

@DLastCodeBenderなぜですか? –

+0

'私のために働いていたものだから@Kevinrob – DLastCodeBender

関連する問題