android – Could not add entry '0' to cache localClassSetAnalysis.bin-ThrowExceptions

Exception or error:

This project was running but today when i run it it gives this error

Error:Execution failed for task ‘:app:compileDebugJavaWithJavac’.
Could not add entry ‘0’ to cache localClassSetAnalysis.bin (/home/blackgoogle/Desktop/SpeechToText/.gradle/2.10/tasks/_app_compileDebugJavaWithJavac/localClassSetAnalysis/localClassSetAnalysis.bin).

this is my app gradle file

apply plugin: ''

repositories {

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.3"

    defaultConfig {
        applicationId ""
        minSdkVersion 15
        targetSdkVersion 23
        versionCode 1
        versionName "1.0"
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), ''

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    testCompile 'junit:junit:4.12'
    compile 'com.nuance:speechkit:2.1+@aar'
    compile ''

and this one is project gradle file

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    repositories {
    dependencies {
        classpath ''

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files

allprojects {
    repositories {

task clean(type: Delete) {
    delete rootProject.buildDir

please guys help….

How to solve:

In your Project SpeechToText .gradle is hidden folder,that’s it is not visible

Run this command in Ubuntu….

rm -f -r home/blackgoogle/Desktop/SpeechToText/.gradle/2.10/tasks/_app_compileDebugJavaWithJavac/localClassSetAnalysis

rm -f -r home/blackgoogle/Desktop/SpeechToText/.gradle/2.10/tasks/_app_compileDebugJavaWithJavac/localJarClasspathSnapshot

It may be work…….


For Mac users run below command:

rm -rf /path/to/your/android/project/.gradle


I had the same problem today, goto


as shown in your stack trace . You will have a few folders there(localClassSetAnalysis & localJarClasspathSnapshot). Delete all of them and try again .Basically they add .lock because of which gradle is not able to act on those dirs.

This worked for me


If you using android studio,

1.) Open your project.

2.) Go to your project structure, and remove .gradle directory and sync project.

3.) Run application.


Go to this folder:-

delete all the contents of this folder.
This folder might be hidden so view hidden files.

Now, rebuild the project.
This is because they add .lock files in the folder automatically because of which gradle is not able to act on those dirs. Once you remove them it will work normally.

Leave a Reply

Your email address will not be published. Required fields are marked *