4

我在 android studio 中更新到 Gradle 1.8 时遇到问题。当我编译我得到这个错误:

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

这是我的 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.intellij:annotations:12.+'
    compile 'com.bugsense.trace:bugsense:3.5'
    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"

    defaultConfig {
        minSdkVersion 8
        targetSdkVersion 18
    }

    signingConfigs {
        release {
            storeFile file("/path/to/keystore")
            storePassword "my-store-password"
            keyAlias "my-key-alias"
            keyPassword "my-key-password"
        }
    }
    buildTypes {
        release {
            signingConfig signingConfigs.release
            debuggable true
            jniDebugBuild false
        }
    }
}

我做了一些研究,发现这个问题应该已经在 android build tools 0.6 中解决了,但是即使我使用的是那个版本,我也遇到了这个问题。你有什么建议吗?

4

1 回答 1

1

有同样的问题,基于这篇 gradle 文章:我改变了 build.gradle :

apply plugin: 'android'

dependencies {
    compile files('libs/android-support-v4.jar')
}

对此

apply plugin: 'android-library'

dependencies {
    compile files('libs/android-support-v4.jar')
}
于 2013-11-04T17:04:56.897 回答