1

Suddenly I have an error when trying to execute my android app.

the Error looks like :

enter image description here

Here is the full log :

    Information:Gradle tasks [:app:generateDebugSources, :app:prepareDebugUnitTestDependencies, :app:mockableAndroidJar, :app:assembleDebug]
:app:preBuild UP-TO-DATE
:app:preDebugBuild UP-TO-DATE
:app:checkDebugManifest
:app:preReleaseBuild UP-TO-DATE
:app:prepareComAndroidSupportAppcompatV72310Library UP-TO-DATE
:app:prepareComAndroidSupportCardviewV72103Library UP-TO-DATE
:app:prepareComAndroidSupportDesign2310Library UP-TO-DATE
:app:prepareComAndroidSupportMultidex101Library UP-TO-DATE
:app:prepareComAndroidSupportRecyclerviewV72310Library UP-TO-DATE
:app:prepareComAndroidSupportSupportV42310Library UP-TO-DATE
:app:prepareComAndroidadvanceTopsnackbar008Library UP-TO-DATE
:app:prepareComFacebookAndroidFacebookAndroidSdk460Library UP-TO-DATE
:app:prepareComIsseiaokiSimplecropview108Library UP-TO-DATE
:app:prepareComMelnykovFloatingactionbutton130Library UP-TO-DATE
:app:prepareDeHdodenhofCircleimageview130Library UP-TO-DATE
:app:prepareDebugDependencies
:app:compileDebugAidl UP-TO-DATE
:app:compileDebugRenderscript UP-TO-DATE
:app:generateDebugBuildConfig UP-TO-DATE
:app:generateDebugAssets UP-TO-DATE
:app:mergeDebugAssets UP-TO-DATE
:app:generateDebugResValues UP-TO-DATE
:app:generateDebugResources UP-TO-DATE
:app:mergeDebugResources UP-TO-DATE
:app:processDebugManifest UP-TO-DATE
:app:processDebugResources UP-TO-DATE
:app:generateDebugSources UP-TO-DATE
:app:preDebugUnitTestBuild UP-TO-DATE
:app:prepareDebugUnitTestDependencies
:app:mockableAndroidJar UP-TO-DATE
:app:processDebugJavaRes UP-TO-DATE
:app:compileDebugJava UP-TO-DATE
:app:compileDebugNdk UP-TO-DATE
:app:compileDebugSources UP-TO-DATE
:app:collectDebugMultiDexComponents UP-TO-DATE
:app:packageAllDebugClassesForMultiDex FAILED
Error:Execution failed for task ':app:packageAllDebugClassesForMultiDex'.
> java.util.zip.ZipException: duplicate entry: bolts/AppLink$Target.class
Information:BUILD FAILED
Information:Total time: 3.345 secs
Information:1 error
Information:0 warnings
Information:See complete output in console

My gradle looks like :

dependencies {
    repositories { mavenCentral() }
    compile fileTree(dir: 'libs', include: ['*.jar'])

    compile 'com.android.support:appcompat-v7:23.1.0'
    compile 'com.parse.bolts:bolts-android:1.+'
    compile fileTree(dir: 'libs', include: 'Parse-*.jar')
    compile 'com.android.support:recyclerview-v7:+'
    compile 'com.android.support:cardview-v7:21.0.+'
    compile 'com.squareup.picasso:picasso:2.5.2'
    compile 'de.hdodenhof:circleimageview:1.3.0'
    compile 'com.android.support:design:23.1.0'
    compile 'com.facebook.android:facebook-android-sdk:4.6.0'
    compile 'com.isseiaoki:simplecropview:1.0.8'
    compile fileTree(dir: 'libs', include: 'ParseCrashReporting-*.jar')
    compile 'com.melnykov:floatingactionbutton:1.3.0'
    androidTestCompile 'com.jayway.android.robotium:robotium:5.5.2'
    compile 'com.androidadvance:topsnackbar:0.0.8'
}

I tried to update Android Studio, Clean the project, build the project, always the same error.

2
  • Check that your project include the same libraries. In your gradle file and in the lib folder Commented Nov 7, 2015 at 10:15
  • See here,perhaps help you : Here Here Commented Nov 7, 2015 at 10:29

1 Answer 1

1

Delete this line :

compile fileTree(dir: 'libs', include: 'Parse-*.jar')

This error occurs when you try to include the same library more than once in your Gradle file. So you need to make sure that there are no duplicate includes, clean & rebuild your project and you're good to go.

Sign up to request clarification or add additional context in comments.

3 Comments

Take out 'compile fileTree(dir: 'libs', include: 'ParseCrashReporting-*.jar')' as well
Finally, delete this one "compile 'com.parse.bolts:bolts-android:1.+''
I tried to delete the three, but same issue, thanks for your help

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.