Android Google应用程序引擎模块错误:任务执行失败';:应用程序:transformClassesWithDexForDebug'&燃气轮机;java.io.IOException:删除失败

Android Google应用程序引擎模块错误:任务执行失败';:应用程序:transformClassesWithDexForDebug'&燃气轮机;java.io.IOException:删除失败,android,google-app-engine,google-cloud-messaging,android-gradle-plugin,gae-module,Android,Google App Engine,Google Cloud Messaging,Android Gradle Plugin,Gae Module,试图用谷歌应用程序引擎模块编译我的android应用程序,但这该死的东西不起作用。它以前可以工作,但由于某种原因,在我清除Android Studio缓存并重新启动后,它停止了编译。以下是我得到的错误: Error:Execution failed for task ':app:transformClassesWithDexForDebug'. > java.io.IOException: Failed to delete /Users/Me/AndroidStudioProjects/M

试图用谷歌应用程序引擎模块编译我的android应用程序,但这该死的东西不起作用。它以前可以工作,但由于某种原因,在我清除Android Studio缓存并重新启动后,它停止了编译。以下是我得到的错误:

Error:Execution failed for task ':app:transformClassesWithDexForDebug'.
> java.io.IOException: Failed to delete /Users/Me/AndroidStudioProjects/MyCoolApp/app/build/intermediates/pre-dexed/debug/appengine-api-1.0-sdk-1.9.18_0179742441e08a2aeb8477eb85038e2130d180e7.jar
我检查了文件夹,但上面的文件甚至不存在——那么为什么它要尝试删除它呢

我还尝试输入一个具有上述名称的虚拟文件,希望它可以工作,但没有

以下是我的gradle文件的外观:

应用程序

apply plugin: 'com.android.application'

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.2"

    defaultConfig {
        applicationId "com.me.mycoolapp"
        minSdkVersion 13
        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'])
    compile 'com.google.android.gms:play-services-gcm:8.4.0' //Needed for GCM
    testCompile 'junit:junit:4.12'
    compile project(path: ':backend', configuration: 'android-endpoints')
    compile 'com.android.support:appcompat-v7:23.1.1'
    compile 'com.android.support:design:23.1.1'
    compile project(':backend')
}

apply plugin: 'com.google.gms.google-services' // Needed for GCM
项目:

// 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.0.0-alpha3'
        classpath 'com.google.gms:google-services:2.0.0-alpha3' // Needed for GCM
        // 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
}

在build.gradle脚本中,设置dexOptions.javaMaxHeapSize配置

android {
            ...
            ...

    dexOptions {

        javaMaxHeapSize "4g"
    }
}

非常愚蠢,但出于某种原因(我不知道为什么),Android studio在我的文件中添加了这一行

编译项目(':backend')

老兄,安卓Studio+GAE模块最近真的很烦人

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.google.android.gms:play-services-gcm:8.4.0' //Needed for GCM
    testCompile 'junit:junit:4.12'
    compile project(path: ':backend', configuration: 'android-endpoints')
    compile 'com.android.support:appcompat-v7:23.1.1'
    compile 'com.android.support:design:23.1.1'
    //compile project(':backend') //DELETE THIS
}