突然我嘗試執行我的Android應用程序時出現錯誤。任務Android問題的執行失敗
錯誤的樣子:
以下是完整的日誌:
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
我gradle這個樣子:
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'
}
我嘗試更新的Android工作室,清理項目,構建項目,總是出現同樣的錯誤。
檢查您的項目是否包含相同的庫。在你的'gradle'文件和'lib'文件夾中 –
看到這裏,也許可以幫助你:[Here](http://stackoverflow.com/questions/32043646/errorexecution-failed-for-task-apppackagealldebugclassesformultidex-in-andr )[Here](http://stackoverflow.com/questions/26966843/java-util-zip-zipexception-duplicate-entry-during-packagealldebugclassesformult) –