java - Gradle停止构建任务

标签 java android android-studio android-gradle-plugin

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

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

我做错了什么?

一些额外的数据 安卓工作室 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'
}

提前致谢

最佳答案

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

关于java - Gradle停止构建任务,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42160804/

相关文章:

java - 1 个 View android 布局上的 2 个属性

android - Flutter SQFlite 一对多关系设置

android - 字段 'Signature' 的值不正确 : value is 662655099 but 67324752 expected

android - react native 。错误 : The file name must end with . xml 或 .png

java - 为什么 java.util.concurrent.TimeUnit.convert 抛出 AbstractMethodError 而不是抽象

java - Butterknife 不适用于适配器类

java - 抽屉导航中的按钮

android - 在 Facebook Android SDK 4.0 中为按钮设置登录/注销文本?

java - onClickListener 是否在其内部的所有代码都在 Android 中运行后才更新 UI?

android - 为什么 java.lang.Integer 在 Android Studio 的自动 Parcelable 实现中被忽略?