question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Hello there:

After going through the following: http://facebook.github.io/react-native/docs/getting-started.html

And then added react-native-svg to the mix I get the following error:

: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_112.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

Total time: 35.916 secs
Could not install the app on the device, read the error above for details.
Make sure you have an Android emulator running or a device connected and have
set up your Android development environment:
https://facebook.github.io/react-native/docs/android-setup.html

[jmoretti:~/Sync/Google Drive/kikiPoc-jm]$ 

Any ideas how I could go about resolving this?

The regular project runs fine through the android emulator, but as soon as I try adding this module it gives me the above error.

here is my JSON file

{
  "name": "AwesomeProject",
  "version": "0.0.1",
  "private": true,
  "scripts": {
    "start": "node node_modules/react-native/local-cli/cli.js start",
    "test": "jest"
  },
  "dependencies": {
    "react": "15.3.2",
    "react-native": "0.36.1",
    "react-native-svg": "^4.3.2"
  },
  "jest": {
    "preset": "jest-react-native"
  },
  "devDependencies": {
    "babel-jest": "16.0.0",
    "babel-preset-react-native": "1.9.0",
    "jest": "16.0.2",
    "jest-react-native": "16.1.0",
    "react-test-renderer": "15.3.2"
  }
}

And tried both linking using react-native and nrpm which both tells me that the linking was successful.

Would much appreciate some help with this.

Cheers,

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:10

github_iconTop GitHub Comments

17reactions
Fouppycommented, Nov 11, 2016

Just encountered the same issue, simply clean your builds:

cd android
./gradlew clean
2reactions
aschwizzy710commented, Jun 15, 2017

screenshot 2017-06-14 22 06 51

Read more comments on GitHub >

github_iconTop Results From Across the Web

java - :app:dexDebug ExecException finished with non-zero ...
I have looked through dependencies in gradle built to see if there were any conflict but found none. I even tried to copy...
Read more >
Error:Execution failed for task ':app:dexDebug'. - Treehouse
When I try to run app it show this error: Error:Execution failed for task ':app:dexDebug'. com.android.ide.common.process.ProcessException: org.
Read more >
Execution failed for task ':app:preDexDebug [37063535]
http://stackoverflow.com/questions/28917696/errorexecution-failed-for-task-appdexdebug-com-android-ide-common-process. It worked in my case.
Read more >
Android error execution failed for task: app:dexDebug
Solution 1: The right answer is, that some of your jar files does not compile. You should go into your "build.gradle" file in...
Read more >
[Solved]-Top-Level Exception app:dexDebug --dex -no-optimize
Coding example for the question Top-Level Exception app:dexDebug --dex -no-optimize --output android studio-eclipse.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found