Java – Unable to turn on initscript class cache for init scripts

Unable to turn on initscript class cache for init scripts… here is a solution to the problem.

Unable to turn on initscript class cache for init scripts

enter image description here

Error:Could not open initscript class cache for initialization script ‘C:\Users\Avishek\AppData\Local\Temp\asLocalRepo14.gradle’ (C:\Users\Avishek.gradle\caches\2.2. 1\scripts\asLocalRepo14_dkwbdtenxxgt2q2wfe57wj30b\InitScript\initscript).
java.io.FileNotFoundException: C:\Users\Avishek.gradle\caches\2.2.1\scripts\asLocalRepo14_dkwbdtenxxgt2q2wfe57wj30b\InitScript\initscript\cache.properties (The system cannot find the file specified)

I

get this error when I want to rebuild a project or clean it up or run a project.

Please someone help me… Thanks….

Solution

Do not use Gradle with a new version of the JDK. It may not support it. In my case, downgrading the JDK solved the problem.

Related Problems and Solutions