0

How can I fix this error? can anyone help me?

Error:java.io.FileNotFoundException:/.../.gradle/2.8/taskArtifacts/cache.properties (No such file or directory)

its my first time to encounter this error in android :3

Shriram
  • 4,343
  • 8
  • 37
  • 64
Kiel
  • 41
  • 7
  • Maybe you have wrong path to Gradle?. – Denis Sologub Feb 26 '16 at 05:45
  • I didn't touch,view,move or replace the Gradle all the time. how is it possible? – Kiel Feb 26 '16 at 05:50
  • Sorry, I haven't this error. Try clean project and build again. If it doesn't help post project file structure and full log. – Denis Sologub Feb 26 '16 at 05:53
  • Information:Gradle tasks [:app:assembleDebug] :app:preBuild UP-TO-DATE :app:preDebugBuild UP-TO-DATE :app:checkDebugManifest :app:preReleaseBuild UP-TO-DATE :http...:preBuild UP-TO-DATE :http...:preReleaseBuild UP-TO-DATE :http...:compileReleaseNdk UP-TO-DATE :http...:compileLint :http...:copyReleaseLint UP-TO-DATE :http...:checkReleaseManifest :http...:preDebugAndroidTestBuild UP-TO-DATE :http...:preDebugBuild UP-TO-DATE :http...:preDebugUnitTestBuild UP-TO-DATE :http...:preReleaseUnitTestBuild UP-TO-DATE – Kiel Feb 26 '16 at 06:00
  • A similar question here and a provided answer. http://stackoverflow.com/a/31275847/5374779 – NNS Feb 26 '16 at 06:00
  • :http...:prepareComAndroidSupportAppcompatV72311Library Error:java.io.FileNotFoundException: /.../.../Desktop/.../.gradle/2.8/taskArtifacts/cache.properties (No such file or directory) > /.../.../Desktop/.../.gradle/.gradle/2.8/taskArtifacts/cache.properties (No such file or directory) Information:BUILD FAILED Information:Total time: 0.898 secs Information:1 error Information:0 warnings Information:See complete output in console – Kiel Feb 26 '16 at 06:00
  • @NNS I tried it already but it didnt help sorry – Kiel Feb 26 '16 at 06:40

2 Answers2

0

well I found a solution for my own question and it works perfectly fine

in cmd/terminal enter this process

  • cd sampleLocation/projectFolder
  • cd .gradle
  • ls
  • cd 2.8
  • ls
  • cd taskArtifacts/
  • ls
  • rm cache.properties.lock

->cd sampleLocation/projectFolder (locate your project) ->cd .gradle (it will direct you to your Gradle) ->ls (it will display the version of your Gradle i think then) ->cd 2.8 (2.8 is just my example of my Gradle version that displays earlier in ls then enter "ls" again) ->ls (it will display the taskArtifacts then go to taskArtifacts) ->cd taskArtifacts/ (it will direct you to your taskArtifacts then enter "ls" again) ->ls (it will display this "cache.properties.lock fileHashes.bin fileSnapshots.bin outputFileStates.bin askArtifacts.bin" and then enter this "rm cache.properties.lock ") ->rm cache.properties.lock (it will remove the cache and it will create a new cache for your project)

Kiel
  • 41
  • 7
0

The answer here did lead me to the problem, but a more reasonable approach is to delete the .gradle in both your $HOME directory and the project directory.

tribone
  • 13
  • 4