Gradle 1.8,build-tools 0.6.3 - 在mergeDebugAssets上编译失败

时间:2013-10-22 11:31:32

标签: android gradle android-studio

今天我被迫通过Android Studio 0.3.0切换到Gradle 1.8。 这是我Execution Failed for Task compileReleaseAIDL之前已经面临的问题 ,但现在我删除了项目中的任何AIDL,我仍然有这个错误:

Gradle: Execution failed for task ':App Code:mergeDebugAssets'.
> Could not call IncrementalTask.taskAction() on task ':App Code:mergeDebugAssets'

请注意,我还将Facebook SDK库项目切换到build-tools 0.6.3。

这是我的build.gradle:

buildscript {
    repositories {
        mavenCentral()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:0.6.+'
        classpath 'com.newrelic.agent.android:agent-gradle-plugin:2.397.0'
    }
}

repositories {
    mavenCentral()
    maven {
        url 'http://www.bugsense.com/gradle/'
    }
}

apply plugin: 'android'
apply plugin: 'newrelic'

dependencies {
    compile 'com.newrelic.agent.android:android-agent:2.397'
    compile 'com.android.support:support-v4:18.0.+'
    compile 'com.android.support:appcompat-v7:18.0.+'
    compile 'com.bugsense.trace:bugsense:3.5'
    compile 'com.intellij:annotations:12.0'
    compile 'com.google.android.gms:play-services:3.1.+'
    compile 'net.hockeyapp.android:HockeySDK:3.0.+'
    compile fileTree(dir: 'libs', include: '*.jar')
    compile project(':libraries:facebook')
}

android {
    compileSdkVersion 18
    buildToolsVersion "18.1.1"

    defaultConfig {
        minSdkVersion 8
        targetSdkVersion 18
    }

    signingConfigs {
        release {
            storeFile file("/Users/user/Documents/AndroidKeys/Sv01")
            storePassword "my-store-password"
            keyAlias "sv01"
            keyPassword "my-key-password"
        }
    }
    buildTypes {
        release {
            signingConfig signingConfigs.release
            debuggable true
            jniDebugBuild false
        }
    }
}

如何成功编译此项目?

编辑:gradle-wrapper.properties:

#
#Thu Oct 10 22:47:46 CEST 2013
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=http\://services.gradle.org/distributions/gradle-1.8-bin.zip

编辑:Stacktrace打印出此错误(导致我之前报告过的错误):

Caused by: java.lang.NoSuchMethodError: com.google.common.io.ByteStreams.hash(Lcom/google/common/io/InputSupplier;Lcom/google/common/hash/HashFunction;)Lcom/google/common/hash/HashCode;
        at com.android.builder.internal.incremental.FileEntity.getSha1(FileEntity.java:187)
        ........

0 个答案:

没有答案