Gradle stop building task

时间:2017-02-10 13:40:46

标签: java android android-studio android-gradle

在Android Studio 2.2.3上单击任何gradle任务时,停止构建任务。

屏幕上没有错误或任何错误消息

我做错了什么?

一些额外的数据 Android Studio 2.2.3 Gradle' com.android.tools.build:gradle:2.2.3'

Gradle顶级构建文件

    buildscript {
    repositories {
        jcenter()
        jcenter()
    }
    dependencies {

        classpath 'com.android.tools.build:gradle:2.2.3'

    }
}

allprojects{
    repositories {
        jcenter()
            jcenter()
    }
    }

enter image description here

这是我的build.gradle文件。

def final myapplicationId = "com.package.myapp"
def final versionnameapp  = "1"
def final versioncodeapp  = 1


allprojects {
repositories {
    // mavenCentral()
    jcenter()
    maven { url "https://jitpack.io" }
    maven { url 'http://clinker.47deg.com/nexus/content/groups/public' }
}
}


apply plugin: 'com.android.application'


configurations {
compile.exclude group: 'javax.inject', module: 'javax.inject'
}



android {
useLibrary 'org.apache.http.legacy'

compileSdkVersion 23
buildToolsVersion "23.0.2"

compileOptions {

    encoding "UTF-8"
    sourceCompatibility JavaVersion.VERSION_1_7
    targetCompatibility JavaVersion.VERSION_1_7
}
lintOptions {
    abortOnError false
}

dexOptions {

    jumboMode true
}


signingConfigs {
    release {
        keyAlias 'chess'
        keyPassword 'android'
        storeFile file('/keystore/sam.keystore')
        storePassword 'android'

    }

}

packagingOptions {
    exclude 'META-INF/DEPENDENCIES.txt'
    exclude 'META-INF/DEPENDENCIES'
    exclude 'META-INF/dependencies.txt'
    exclude 'META-INF/LICENSE.txt'
    exclude 'META-INF/LICENSE'
    exclude 'META-INF/license.txt'
    exclude 'META-INF/LGPL2.1'
    exclude 'META-INF/NOTICE.txt'
    exclude 'META-INF/NOTICE'
    exclude 'META-INF/notice.txt'
    exclude 'META-INF/INDEX.LIST'
    exclude 'META-INF/ASL2.0'

}


defaultConfig {
    targetSdkVersion 23
    renderscriptTargetApi 19
    renderscriptSupportModeEnabled false

    multiDexEnabled true
    minSdkVersion 14

   applicationId = myapplicationId 

}


buildTypes {
    release {
        signingConfig signingConfigs.release
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'),     'proguard-rules.pro'
    }
    debug {

        defaultConfig {
            debuggable true
            versionName = versionnameapp   + "-DEBUG"
        }
    }

}


afterEvaluate {
    tasks.matching {
        it.name.startsWith('dex')
    }.each { dx ->
        if (dx.additionalParameters == null) {
            dx.additionalParameters = []
        }
        dx.additionalParameters += '--multi-dex'
        //        dx.additionalParameters += "--main-dex-    list=$projectDir/multidex.keep".toString()
    }
}
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile project(':reportes')
compile project(':locationlib')

compile 'com.android.support:percent:23.3.0'
compile 'com.dlazaro66.qrcodereaderview:qrcodereaderview:1.0.0'
compile 'joda-time:joda-time:2.3'

compile 'com.android.support:multidex:1.0.1'
compile 'com.github.amlcurran.showcaseview:library:5.0.0'
compile 'ch.acra:acra:4.5.0'

compile 'com.pnikosis:materialish-progress:1.7'

compile 'com.android.support:design:23.0.1'
compile 'com.android.support:support-v4:23.0.1'
compile 'com.github.panwrona:DownloadProgressBar:1.1'

compile 'org.jsoup:jsoup:1.8.3'

compile 'com.cleveroad:slidingtutorial:0.9.5'
}

提前致谢

1 个答案:

答案 0 :(得分:0)

从命令行执行gradlew assemble。在那里你会得到你错过的错误。