3

I have an app that works fine on the emulator but crashes on startup on the phone.

Am i right in saying i just extract the contents of the SDK folder into libs rather than have just one parse folder in libs with everything in it?

Gradle file

 apply plugin: 'com.android.application'
    apply plugin: 'com.google.gms.google-services'

android {

compileSdkVersion 23
buildToolsVersion "21.1.2"
defaultConfig {
    applicationId "com.aaa.bbb"
    minSdkVersion 16
    targetSdkVersion 19
    versionCode 30
    versionName "30"
}

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


}
productFlavors {
}
defaultConfig {
    multiDexEnabled true
} }

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.android.support:appcompat-v7:21.0.3'
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.mcxiaoke.volley:library:1.+'
    compile 'com.nhaarman.listviewanimations:lib-core:3.1.0@aar'
    compile 'com.nhaarman.listviewanimations:lib-manipulation:3.1.0@aar'
    compile 'com.nhaarman.listviewanimations:lib-core-slh:3.1.0@aar'
    compile 'com.nononsenseapps:filepicker:+'
    compile 'io.socket:socket.io-client:0.2.1'
    compile 'com.google.android.gms:play-services:7.8.0'
    compile 'com.android.support:appcompat-v7:19.+'
    compile 'com.google.android.gms:play-services-analytics:7.8.0'
    compile 'com.android.support:design:23.+'
    compile 'com.android.support:support-v4:23.+'
    compile 'com.parse.bolts:bolts-android:1.+'
    compile 'com.parse:parse-android:1.+'

}

Log

:app:packageAllDebugClassesForMultiDex FAILED
Error:Execution failed for task ':app:packageAllDebugClassesForMultiDex'.
> java.util.zip.ZipException: duplicate entry: bolts/AggregateException.class
ChrisM
  • 706
  • 11
  • 30

1 Answers1

4

One of your libraries is using different bolts library/classes so there is some duplicate. Please use ./gradlew yourModuleName:dependencies in terminal to check dependencies tree

michal.luszczuk
  • 2,883
  • 1
  • 15
  • 22
  • When i go with sudo ./gradlew collegeplanner:dependencies it says command not found. When i go with ./gradlew collegeplanner:dependencies it gives permission error. This is the linux mint terminal. Do i need to install something else? – ChrisM Nov 07 '15 at 20:29
  • Please Check http://stackoverflow.com/questions/17668265/gradlew-permission-denied – michal.luszczuk Nov 07 '15 at 20:30
  • 1
    Turns out it was the bolts file was in the lib folder as well as the gradle file. A tutorial i was following told me to extract the contents of SDK into the lib folder when it shouldnt have as Parse.com tells you to add it to the gradle file. – ChrisM Nov 08 '15 at 15:27