简体   繁体   中英

Error:Execution failed for task ':app:preDexDebug'. > … finished with non-zero value 1

I add a library to my project,but the library has some jar packages that i have used in my app,so it comes out the error "finished with non-zero value 2",after i modify the jar packages version,it comes out the error "Error:Execution failed for task ':app:preDexDebug'. > ... finished with non-zero value 1",i dont konw how to solve it 。 the 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')
} `

the library 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')
}

this is the first time i use stackoverflow to ash question,please tell me how to solve it .thank you!

I also dont know how to solve the problem.but the project is built successfully.There is a jar package that cant be opened. I delete it and add the jar package from other project.it works.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM