React-native-share: finished with non-zero exit value 2

Created on 9 Aug 2016  路  3Comments  路  Source: react-native-share/react-native-share

There is an error 'finished with non-zero exit value 2' when i was run on android environment. How to solve this problem ?

Most helpful comment

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

All 3 comments

+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.

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

naveedmastan picture naveedmastan  路  3Comments

andyfen picture andyfen  路  4Comments

crivera picture crivera  路  3Comments

saifkamaal picture saifkamaal  路  3Comments

vikjovanov picture vikjovanov  路  3Comments