2 thoughts on “finished with non-zero exit value 2

  1. I think I solved it. If you installed the package with rnpm, follow the steps of Manual Install. You probably only have to edit MainApplication.java to add the include and the package in the getPackages() method.

    Then delete node_modules/react-native-share/android/build folder along with android/app/build folder, and run react-native run-android again.

  2. if this is the error you got

    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_92.jdk/Contents/Home/bin/java” finished with non-zero exit value 2

    I solved it by running this:

    cd android && ./gradlew clean

Comments are closed.

2 thoughts on “finished with non-zero exit value 2

  1. I think I solved it. If you installed the package with rnpm, follow the steps of Manual Install. You probably only have to edit MainApplication.java to add the include and the package in the getPackages() method.

    Then delete node_modules/react-native-share/android/build folder along with android/app/build folder, and run react-native run-android again.

  2. if this is the error you got

    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_92.jdk/Contents/Home/bin/java” finished with non-zero exit value 2

    I solved it by running this:

    cd android && ./gradlew clean

Comments are closed.