意外的顶级异常:错误:任务执行失败':dexDebug'在android工作室

时间:2014-12-25 18:36:32

标签: android facebook

我有一个问题。当我运行我的应用程序时,我收到此错误,但是构建成功。我知道可能存在lib冲突错误。我跟着很多URL其中一个是http://www.thedevline.com/search/label/Android%20development

但我没有得到什么是问题。错误是

信息:Gradle任务[:assembleDebug] :预生成 :compileDebugNdk :preDebugBuild :checkDebugManifest :preReleaseBuild :Facebook的:compileLint :facebook:copyReleaseLint UP-TO-DATE :Facebook的:预生成 :Facebook的:preReleaseBuild :Facebook的:checkReleaseManifest :Facebook的:preDebugBuild :Facebook的:preDebugTestBuild :facebook:prepareComAndroidSupportSupportV42103Library UP-TO-DATE :Facebook的:prepareReleaseDependencies :facebook:compileReleaseAidl UP-TO-DATE :facebook:compileReleaseRenderscript UP-TO-DATE :facebook:generateReleaseBuildConfig UP-TO-DATE :facebook:generateReleaseAssets UP-TO-DATE :facebook:mergeReleaseAssets UP-TO-DATE :facebook:generateReleaseResValues UP-TO-DATE :facebook:generateReleaseResources UP-TO-DATE :facebook:mergeReleaseResources UP-TO-DATE :facebook:processReleaseManifest UP-TO-DATE :facebook:processReleaseResources UP-TO-DATE :facebook:generateReleaseSources UP-TO-DATE :facebook:compileReleaseJava UP-TO-DATE :facebook:extractReleaseAnnotations UP-TO-DATE :facebook:mergeReleaseProguardFiles UP-TO-DATE :facebook:processReleaseJavaRes UP-TO-DATE :facebook:packageReleaseJar UP-TO-DATE :facebook:compileReleaseNdk UP-TO-DATE :facebook:packageReleaseJniLibs UP-TO-DATE :facebook:packageReleaseLocalJar UP-TO-DATE :facebook:packageReleaseRenderscript UP-TO-DATE :facebook:packageReleaseResources UP-TO-DATE :facebook:bundleRelease UP-TO-DATE :prepareComAndroidSupportSupportV42103Library UP-TO-DATE :prepareComFacebookAndroidFacebook3211Library UP-TO-DATE :prepareComGoogleAndroidGmsPlayServices6587Library UP-TO-DATE :prepareDebugDependencies :compileDebugAidl UP-TO-DATE :compileDebugRenderscript UP-TO-DATE :generateDebugBuildConfig UP-TO-DATE :generateDebugAssets UP-TO-DATE :mergeDebugAssets UP-TO-DATE :generateDebugResValues UP-TO-DATE :generateDebugResources UP-TO-DATE :mergeDebugResources UP-TO-DATE :processDebugManifest UP-TO-DATE :processDebugResources UP-TO-DATE :generateDebugSources UP-TO-DATE :compileDebugJava 注意:某些输入文件使用或覆盖已弃用的API。 注意:使用-Xlint重新编译:弃用以获取详细信息。 :preDexDebug :dexDebug 意外的顶级例外情况: 错误:任务执行失败':dexDebug'。

  

com.android.ide.common.internal.LoggedErrorException:无法运行命令:       /home/manu-005/Android_Setups/adt-bundle-linux-x86_64-20140702/sdk/build-tools/android-4.4W/dx --dex --no-optimize --output / home / manu-005 / workspace / appName / build / intermediates / dex / debug / home / manu-005 / workspace / AppName / build / intermediates / classes / debug / home / manu-005 / workspace / AppName / build / intermediates / pre-dexed / debug / support -annotations-21.0.3-49ca8e8cfc94918d7386df6065be15226206f457.jar /home/manu-005/workspace/AppName/build/intermediates/pre-dexed/debug/bolts-android-1.1.4-61545c8defb142f83369be67bcebfa1f7690985c.jar / home / manu-005 / workspace /AppName/build/intermediates/pre-dexed/debug/MobileAppTracker-3.3.3-ca9457cd9ec6680ec9d845d2fc19efec4582c397.jar /home/manu-005/workspace/AppName/build/intermediates/pre-dexed/debug/internal_impl-21.0.3-e77489df911cb5896aab6b91a4d4b9a838794c56 .jar /home/manu-005/workspace/AppName/build/intermediates/pre-dexed/debug/crittercism_v5_0_3_sdkonly-e644ef988027d1838362de88be35bbf0b876caf6.jar / home / manu-005 / workspace / AppName / build / intermediates / pre-d exed / debug / MobileAppTracker-javadoc-3.3.3-1641c6311e6f070ecd4d1320f44b1ba50b75dd0c.jar /home/manu-005/workspace/AppName/build/intermediates/pre-dexed/debug/classes-001b548439aeb2e89d0d4f68cd7c4e4e33d1588c.jar / home / manu-005 / workspace / AppName / build / intermediates / pre-dexed / debug / android-support-v4-cc1887d592a4c530b10eb1125f7e630a900240bc.jar /home/manu-005/workspace/AppName/build/intermediates/pre-dexed/debug/classes-34d67503c62f0f63b1f57f2f61a56c8d3b95a06e.jar/home/马努-005 /工作区/ AppName的/生成/中间体/前dexed /调试/类 - f79c881d5c91c7786b3cf2ab1a07ece9788351e8.jar     错误代码:       2     输出:       意外的顶级例外情况:       com.android.dex.DexException:多个dex文件定义Landroid / support / annotation / AnimRes;           在com.android.dx.merge.DexMerger.readSortableTypes(DexMerger.java:594)           在com.android.dx.merge.DexMerger.getSortedTypes(DexMerger.java:552)           在com.android.dx.merge.DexMerger.mergeClassDefs(DexMerger.java:533)           在com.android.dx.merge.DexMerger.mergeDexes(DexMerger.java:170)           在com.android.dx.merge.DexMerger.merge(DexMerger.java:188)           在com.android.dx.command.dexer.Main.mergeLibraryDexBuffers(Main.java:439)           在com.android.dx.command.dexer.Main.runMonoDex(Main.java:287)           在com.android.dx.command.dexer.Main.run(Main.java:230)           在com.android.dx.command.dexer.Main.main(Main.java:199)           在com.android.dx.command.Main.main(Main.java:103)   信息:建筑失败   信息:总时间:3分钟39.856秒   信息:1错误   信息:0警告   信息:请参阅控制台中的完整输出

我尝试了很多次,但我无法解决此错误。请帮助我。 提前致谢

2 个答案:

答案 0 :(得分:0)

问题在于:

  

EXCEPTION:com.android.dex.DexException:多个dex文件定义   Landroid /支撑/注解/ AnimRes;在

如果您的构建中有相同类的多个副本,则会发生这种情况,这意味着您在项目中指定了相同的Android支持库的2个以上版本。

答案 1 :(得分:0)

你好这个问题我找到了解决方案流动你的网址,但另一篇文章

错误包括第二方库两次。 我猜这两个库可能使用不同版本的support-v4库,或者播放服务库。

这个问题的更多解决方案在这里我希望通过阅读本文你将解决问题

http://www.thedevline.com/2014/06/unexpected-top-level-exception.html