android - 无法将条目 '0' 添加到缓存 localClassSetAnalysis.bin

标签 android android-studio

这个项目正在运行,但是今天我运行它时出现了这个错误

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).

这是我的应用程序 gradle 文件

apply plugin: 'com.android.application'

repositories {
    mavenCentral()
}

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.3"

    defaultConfig {
        applicationId "timepass.vectorx.com.speechtotext"
        minSdkVersion 15
        targetSdkVersion 23
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    testCompile 'junit:junit:4.12'
    compile 'com.nuance:speechkit:2.1+@aar'
    compile 'com.android.support:appcompat-v7:23.4.0'
}

这个是项目的gradle文件

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

buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:2.1.0'

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

allprojects {
    repositories {
        jcenter()
    }
}

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

请大家帮忙....

最佳答案

在你的 SpeechToText 项目中,.gradle 是隐藏文件夹,所以它是不可见的

在 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

它可能是工作.......

关于android - 无法将条目 '0' 添加到缓存 localClassSetAnalysis.bin,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37827055/

相关文章:

android - 如何更改 BottomSheetDialog 的默认高度?

Android 使用加速度计数据计算速度

android - 阻止 Android 应用在 Windows 11 上运行

java - 在android studio中分配给新的局部变量快捷方式(ctrl-2 L)

java - 以相对布局自动组织 View |安卓工作室

android-studio - 无法解析符号 'Theme' 验证 Android XML 文件中的资源引用

java - 从 fresco 获取 bitmapdrawable

android - 在多行 TextView 的末尾放置一个 View

Android Studio 2.0 构建 gradle 报错

android - 如何修复 "Content is not allowed in prolog"构建错误?