Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Gradle Build Failure Could not open proj class cache for build file

Tags:

gradle

FAILURE: Build failed with an exception.  * What went wrong: A problem occurred configuring root project 'oscar'. > Could not open proj class cache for build file '/Users/prakashv/dev/workspace/oscar-api/build.gradle' (/Users/prakashv/.gradle/caches/2.6/scripts/build_7o20dvaacd2xu3ci3o56uhd4f/proj).    > Timeout waiting to lock proj class cache for build file '/Users/prakashv/dev/workspace/oscar-api/build.gradle' (/Users/prakashv/.gradle/caches/2.6/scripts/build_7o20dvaacd2xu3ci3o56uhd4f/proj). It is currently in use by another Gradle instance.      Owner PID: unknown      Our PID: 47991      Owner Operation: unknown      Our operation: Initialize cache      Lock file: /Users/prakashv/.gradle/caches/2.6/scripts/build_7o20dvaacd2xu3ci3o56uhd4f/proj/cache.properties.lock  * Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. 

Any idea what the problem could be ? I am using gradle 2.6 and Java 1.8.0_60

like image 200
premprakash Avatar asked Sep 11 '15 00:09

premprakash


1 Answers

To solve this I had to first kill the Java(TM) Platform SE binary process and then I was able to delete the whole /Users/<username>/.gradle/caches folder which allowed Gradle commands to work once again.

I believe this issue may have happened for me as a result of adding a new dependency to my build.gradle file through IntelliJ IDEA.

like image 177
jpierson Avatar answered Sep 23 '22 14:09

jpierson