完成时非零退出值2

时间:2016-01-27 15:23:15

标签: android

我有这个问题几个小时,我没有上升。请帮帮我。

  1. 我已经做了Clean / Build / Rebuild / Cache Invalidate / Gradle sync等。
  2. 最后,当我在Alert Dialog中有onClick Listner时,我收到此错误。
  3. 我正在调用一个按钮来显示一个片段的对话框,我将Context传递给" getActivity" ..但它适用于Toast 这不是问题(Toast works和Dialog也适用于ok按钮 没有听众。)
  4.   

    :app:preBuild UP-TO-DATE       :app:preDebugBuild UP-TO-DATE       :应用:checkDebugManifest       :app:preReleaseBuild UP-TO-DATE       :app:prepareComAndroidSupportAppcompatV72220Library UP-TO-DATE       :app:prepareComAndroidSupportDesign2220Library UP-TO-DATE       :app:prepareComAndroidSupportMediarouterV72200Library UP-TO-DATE       :app:prepareComAndroidSupportSupportV42220Library UP-TO-DATE       :app:prepareComCrashlyticsSdkAndroidAnswers132Library UP-TO-DATE       :app:prepareComCrashlyticsSdkAndroidBeta113Library UP-TO-DATE       :app:prepareComCrashlyticsSdkAndroidCrashlytics252Library UP-TO-DATE       :app:prepareComCrashlyticsSdkAndroidCrashlyticsCore235Library UP-TO-DATE       :app:prepareComGithubLzyzsdCircleprogress110Library UP-TO-DATE       :app:prepareComGoogleAndroidGmsPlayServices750Library UP-TO-DATE       :app:prepareComGoogleAndroidGmsPlayServicesAds750Library UP-TO-DATE       :app:prepareComGoogleAndroidGmsPlayServicesAnalytics750Library UP-TO-DATE       :app:prepareComGoogleAndroidGmsPlayServicesAppindexing750Library UP-TO-DATE       :app:prepareComGoogleAndroidGmsPlayServicesAppinvite750Library UP-TO-DATE       :app:prepareComGoogleAndroidGmsPlayServicesAppstate750Library UP-TO-DATE       :app:prepareComGoogleAndroidGmsPlayServicesBase750Library UP-TO-DATE       :app:prepareComGoogleAndroidGmsPlayServicesCast750Library UP-TO-DATE       :app:prepareComGoogleAndroidGmsPlayServicesDrive750Library UP-TO-DATE       :app:prepareComGoogleAndroidGmsPlayServicesFitness750Library UP-TO-DATE       :app:prepareComGoogleAndroidGmsPlayServicesGames750Library UP-TO-DATE       :app:prepareComGoogleAndroidGmsPlayServicesGcm750Library UP-TO-DATE       :app:prepareComGoogleAndroidGmsPlayServicesIdentity750Library UP-TO-DATE       :app:prepareComGoogleAndroidGmsPlayServicesLocation750Library UP-TO-DATE       :app:prepareComGoogleAndroidGmsPlayServicesMaps750Library UP-TO-DATE       :app:prepareComGoogleAndroidGmsPlayServicesNearby750Library UP-TO-DATE       :app:prepareComGoogleAndroidGmsPlayServicesPanorama750Library UP-TO-DATE       :app:prepareComGoogleAndroidGmsPlayServicesPlus750Library UP-TO-DATE       :app:prepareComGoogleAndroidGmsPlayServicesSafetynet750Library UP-TO-DATE       :app:prepareComGoogleAndroidGmsPlayServicesWallet750Library UP-TO-DATE       :app:prepareComGoogleAndroidGmsPlayServicesWearable750Library UP-TO-DATE       :app:prepareComJourneyappsZxingAndroidEmbedded303Library UP-TO-DATE       :app:prepareComOguzdevCircularFloatingActionMenu102Library UP-TO-DATE       :app:prepareComReginaldSwiperefreshLibrary111Library UP-TO-DATE       :app:prepareIoFabricSdkAndroidFabric136Library UP-TO-DATE       :app:prepareRuNotiesScrollable113Library UP-TO-DATE       :应用: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:processDebugManifest UP-TO-DATE       :应用:fabricGenerateResourcesDebug       :app:generateDebugResValues UP-TO-DATE       :应用:generateDebugResources       :应用:mergeDebugResources       :应用:processDebugResources       :应用:generateDebugSources       :app:preDebugAndroidTestBuild UP-TO-DATE       :应用:prepareDebugAndroidTestDependencies       :app:compileDebugAndroidTestAidl UP-TO-DATE       :app:processDebugAndroidTestManifest UP-TO-DATE       :app:compileDebugAndroidTestRenderscript UP-TO-DATE       :app:generateDebugAndroidTestBuildConfig UP-TO-DATE       :app:generateDebugAndroidTestAssets UP-TO-DATE       :app:mergeDebugAndroidTestAssets UP-TO-DATE       :app:generateDebugAndroidTestResValues UP-TO-DATE       :app:generateDebugAndroidTestResources UP-TO-DATE       :app:mergeDebugAndroidTestResources UP-TO-DATE       :app:processDebugAndroidTestResources UP-TO-DATE       :app:generateDebugAndroidTestSources UP-TO-DATE       :app:processDebugJavaRes UP-TO-DATE       :应用:compileDebugJava       注意:某些输入文件使用或覆盖已弃用的API。       注意:使用-Xlint重新编译:弃用以获取详细信息。       :app:compileDebugNdk UP-TO-DATE       :应用:compileDebugSources       :app:preDexDebug UP-TO-DATE       :应用程序:dexDebug

         

    意外的顶级例外情况:       com.android.dex.DexIndexOverflowException:方法ID不在[0,0xffff]中:65536         在com.android.dx.merge.DexMerger $ 6.updateIndex(DexMerger.java:502)         在com.android.dx.merge.DexMerger $ IdMerger.mergeSorted(DexMerger.java:277)         在com.android.dx.merge.DexMerger.mergeMethodIds(DexMerger.java:491)         在com.android.dx.merge.DexMerger.mergeDexes(DexMerger.java:168)         在com.android.dx.merge.DexMerger.merge(DexMerger.java:189)         在com.android.dx.command.dexer.Main.mergeLibraryDexBuffers(Main.java:502)         在com.android.dx.command.dexer.Main.runMonoDex(Main.java:334)         在com.android.dx.command.dexer.Main.run(Main.java:277)         在com.android.dx.command.dexer.Main.main(Main.java:245)         在com.android.dx.command.Main.main(Main.java:106)       错误:任务':app:dexDebug'执行失败。       com.android.ide.common.process.ProcessException:org.gradle.process.internal.ExecException:进程'命令   ' C:\ Program Files \ Java \ jdk1.8.0_60 \ bin \ java.exe''完成了   非零退出值2       信息:建筑失败       信息:总时间:13.67秒       信息:1错误       信息:0警告       信息:在控制台中查看完整输出       这是错误       这是我的Dialog和XML Button

    按钮的XML

    <Button
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:text="Rimuovi chiamata abbinata"
        android:id="@+id/btn_del_chiamata"
        android:layout_above="@+id/riep_tec_rl_nav"
        android:layout_centerHorizontal="true"
        android:layout_marginRight="10dp"
        android:layout_marginLeft="10dp"
        android:drawableRight="@drawable/delete"
        android:background="@xml/edit_text" />
    

1 个答案:

答案 0 :(得分:0)

您遇到65K方法计数限制。您可以使用multidex或减少方法的数量(例如使用proguard)请阅读:https://developer.android.com/tools/building/multidex.html