finished with non-zero exit value 2这是什么情况?



  • 编译出错,经常遇见,不知道怎么解决
    :app:dexDebug FAILED

    FAILURE: Build failed with an exception.

    • What went wrong:
      Execution failed for task ':app:dexDebug'.

    com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/Home/bin/java'' finished with non-zero exit value 2

    • Try:
      Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

    BUILD FAILED