错误:任务':app:preDexDebug'执行失败。 > ...以非零值1结束

时间:2015-05-09 07:47:32

标签: java android android-studio

我在我的项目中添加了一个库,但是库中有一些我在我的应用程序中使用过的jar包,所以它出现了错误"完成了非零值2"我修改后jar包版本,它出现错误"错误:执行失败的任务':app:preDexDebug'。 > ...完成非零值1",我不知道如何解决它。 app buidle.gradle:

`apply plugin: 'com.android.application'

android {

    packagingOptions{
        exclude 'META-INF/LICENSE.txt'
        exclude 'META-INF/NOTICE.txt'
    }
    lintOptions {
        abortOnError false
    }

    compileSdkVersion 21
    buildToolsVersion "21.1.2"

    defaultConfig {
        applicationId "com.example.fengmanlou.logintest"
        minSdkVersion 14
        targetSdkVersion 21
        versionCode 2
        versionName "2.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.android.support:support-v4:22.0.0'
    compile project(':slibingtab')
    compile project(':leanchatlib')
    compile files('libs/weibo.sdk.android.sso.jar')
    compile files('libs/Java-WebSocket-1.2.0-leancloud.jar')
    compile files('libs/qq.sdk.1.6.1.jar')
    compile files('libs/httpmime-4.2.4.jar')
    compile files('libs/fastjson-1.1.37-leancloud.jar')
    compile files('libs/avoscloud-statistics-v3.1.1.jar')
    compile files('libs/avoscloud-sdk-v3.1.4.jar')
    compile files('libs/avoscloud-push-v3.1.4.jar')
    compile files('libs/android-async-http-1.4.6.jar')
    compile files('libs/android_api_1.1_forsdk.jar')
    compile files('libs/BaiduLBS_Android.jar')
    compile files('libs/galaxy_mini.jar')
    compile files('libs/universal-image-loader-1.9.3.jar')
    compile files('libs/avoscloud-sns-v3.1.1.jar')
    compile files('libs/avoscloud-search-v3.1.1.jar')
    compile files('libs/weibosdkcore.jar')
    compile files('libs/litepal.xml-1.2.0.jar')
    compile project(':pulltorefresh')
    compile files('libs/avoscloud-feedback-v3.1.1.jar')
    compile files('libs/jsoup-1.8.1.jar')
    compile project(':slibingmenu')
} `

库build.gradle:

apply plugin: 'com.android.library'

android {
    compileSdkVersion 21
    buildToolsVersion "21.1.2"

    defaultConfig {
        minSdkVersion 14
        targetSdkVersion 21
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.android.support:support-v4:22.0.0'
    compile files('libs/android-async-http-1.4.6.jar')
    compile files('libs/avoscloud-push-v3.1.4.jar')
    compile files('libs/avoscloud-sdk-v3.1.4.jar')
    compile files('libs/butterknife-6.1.0.jar')
    compile files('libs/eventbus-2.4.0.jar')
    compile files('libs/fastjson-1.1.37-leancloud.jar')
    compile files('libs/httpmime-4.2.4.jar')
    compile files('libs/Java-WebSocket-1.2.0-leancloud.jar')
    compile files('libs/prettytime-3.2.5.Final.jar')
    compile files('libs/universal-image-loader-1.9.3.jar')
}

这是我第一次使用stackoverflow来解决问题,请告诉我如何解决它。谢谢你!

1 个答案:

答案 0 :(得分:0)

我也不知道如何解决这个问题。但项目是成功构建的。有一个jar包无法打开。我将其删除并从其他project.it中添加jar包。