没有这样的属性:类的bootClasspath:com.android.builder.core.AndroidBuilder

时间:2016-03-14 20:28:40

标签: android android-studio gradle bootclasspath

我在Android Studio 1.5.1中收到错误,而且我无法解决我的生活问题。它读,

  

"错误:任务':app:dexguardDebug'执行失败。   没有这样的属性:类的bootClasspath:com.android.builder.core.AndroidBuilder"

从命令行运行./gradle2 debugCompile --stacktrace时,它会显示:

出了什么问题:

  

任务' compileDebug'在根项目' BestWestern'中含糊不清。   候选人是:' compileDebugAidl',' compileDebugAndroidTestAidl',   ' compileDebugAndroidTestJavaWithJavac',' compileDebugAndroidTestNdk',   ' compileDebugAndroidTestRenderscript&#39 ;,   ' compileDebugAndroidTestSources',' compileDebugJavaWithJavac',   ' compileDebugNdk',' compileDebugRenderscript',' compileDebugSources',   ' compileDebugUnitTestJavaWithJavac',' compileDebugUnitTestSources'。

我不确定从这一点开始做什么

以下是我的成绩档案:

//////////////////////
// Module: app
//////////////////////
apply plugin: 'com.android.application'
apply plugin: 'dexguard'

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.1"
    defaultConfig {
        applicationId "com.bestwestern.android"
        minSdkVersion 14
        targetSdkVersion 23
        versionCode 143
        versionName "5.5"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        /*release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            debuggable true
        }*/


        debug {
            proguardFile getDefaultDexGuardFile('dexguard-debug.pro')
            proguardFile 'dexguard-project.txt'
            proguardFile 'proguard-project.txt'
        }
        release {
            proguardFile getDefaultDexGuardFile('dexguard-release.pro')
            proguardFile 'dexguard-project.txt'
            proguardFile 'proguard-project.txt'
        }
    }
    packagingOptions {
        exclude 'LICENSE.txt'
    }

    /*productFlavors {
    }*/
}

repositories {
    mavenCentral()
    maven { url 'https://maven.fabric.io/public' }
    flatDir {
        dirs 'libs'
    }
}

dependencies {
    //compile 'com.android.support:multidex:1.0.1'
    compile fileTree(include: ['*.jar'], dir: 'libs')
    compile 'com.android.support:appcompat-v7:23.0.1'
    compile 'com.android.support:cardview-v7:23.0.1'
    compile 'com.google.android.gms:play-services-location:7.0.0'
    compile project(':androidtimessquare')
    compile 'com.squareup.retrofit:retrofit:1.9.0'
    compile 'com.squareup.okhttp:okhttp-urlconnection:2.2.0'
    compile 'com.squareup.okhttp:okhttp:2.2.0'
    //compile 'com.squareup.picasso:picasso:2.+'
    compile 'com.android.support:recyclerview-v7:23.0.1'
    compile 'de.hdodenhof:circleimageview:1.2.2'
    compile 'uk.co.chrisjenx:calligraphy:2.1.0'
    compile 'de.greenrobot:eventbus:2.4.0'
    //compile(name: 'masterpass-android-library-release', ext: 'aar')

    // AndroidJUnit Runner dependencies
    androidTestCompile 'com.android.support:support-annotations:23.0.1'
    androidTestCompile 'com.android.support.test:runner:0.2'
    androidTestCompile 'com.android.support.test:rules:0.2'
    // Espresso dependencies
    androidTestCompile 'com.android.support.test.espresso:espresso-core:2.1'
    compile files('libs/adobeMobileLibrary-4.6.1.jar')
    compile 'com.facebook.android:facebook-android-sdk:4.1.0'
    //compile 'org.twitter4j:twitter4j-core:4.0.2'
    compile('com.twitter.sdk.android:tweet-composer:0.8.0@aar') {
        transitive = true;
    }
    compile 'com.github.bumptech.glide:glide:3.6.+'
    compile 'com.readystatesoftware.sqliteasset:sqliteassethelper:+'
    compile project(':googlemapssdkm4b_lib')
    compile files('libs/RootShell.jar')
    //compile files('libs/dexguard-util.jar')
}

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

buildscript {
    repositories {
        maven { url 'http://repo1.maven.org/maven2' }
        mavenCentral()
        flatDir dirs: 'lib'
    }
    dependencies {
        /*classpath ('com.android.tools.build:gradle:1.0.0') {
            exclude module: 'proguard-gradle'
        }
        classpath "jp.leafytree.gradle:gradle-android-scala-plugin:1.3.1"
        classpath ('net.sf.proguard:proguard-gradle:5.0') {
            force = true
        }*/

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

        classpath 'com.android.tools.build:gradle:1.5.0'
        classpath ':dexguard:'
    }
}

allprojects {
    repositories {
        maven { url 'http://repo1.maven.org/maven2' }
    }
}

1 个答案:

答案 0 :(得分:0)

这很可能会导致Android Gradle Plugin和DexGuard库的版本不兼容。尝试将Android Gradle Plugin的版本降级为1.3.1。

我可以问你使用的是哪个版本的DexGuard吗?

相关问题