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.

Execution failed for task ':app:preDebugBuild'

See original GitHub issue

I have downloaded the example code from this repo, deleted ios folder to mitigate ios package linking specific error (on Windows), and then I could successfully use react-native link react-native-razorpay. In android/app/build.gradle, this sets implementation project(':react-native-razorpay'), while docs say to do compile project(':react-native-razorpay') in manual steps.

Issue: On running react-native run-android I am getting following error threads, which I could not fix myself. I did try a day worth of combinations. I am getting the same thing irrespective of using the example folder (with deleted ios folder) or creating a new one with react-native init .... Both are behaving the same as reported below. I tried both of these following changes in build.gradle in both types of projects. Errors are:

With implementation project(':react-native-razorpay'):

> Task :app:preDebugBuild FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:preDebugBuild'.
> Android dependency 'com.facebook.fresco:imagepipeline-base:1.10.0' is set to compileOnly/provided which is not supported

With compile project(':react-native-razorpay'):

> Task :app:preDebugBuild FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:preDebugBuild'.
> Android dependency 'com.facebook.react:react-native' has different version for the compile (0.58.3) and runtime (0.20.1) classpath. You should manually set the same version via DependencyResolution

Note: I had to change minSDK version from 16 to 19 to match with react-native-razorpay if that matters.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:8 (1 by maintainers)

github_iconTop GitHub Comments

6reactions
sillysachincommented, Mar 23, 2019

It is functional if you follow manual steps as i have pointed out https://medium.com/@sachin.r.r/using-razorpay-in-react-native-sample-3dea020de6a5

5reactions
sillysachincommented, Feb 28, 2019

The automatic steps did not work. The manual steps need a bit more of documentation to be clear how to follow. https://medium.com/@sachin.r.r/using-razorpay-in-react-native-sample-3dea020de6a5

Read more comments on GitHub >

github_iconTop Results From Across the Web

Execution failed for task ':app:preDebugBuild'. #3 - GitHub
What went wrong: Execution failed for task ':app:preDebugBuild'. ... Try: Run with --stacktrace option to get the stack trace. Run with --info or ......
Read more >
Flutter-Execution failed for task ':app:preDebugBuild'
I'm starting developing apps with flutter, and I encounter with this error when I clone a project from GitHub: What went wrong? Execution...
Read more >
Execution failed for task preDebugBuild in Flutter - YouTube
hostprogramming Execution failed for task ': app : preDebugBuild '.in Flutter.
Read more >
Error with Android Studio build, when downgrade android ...
Execution failed for task ':app:prepareComAndroidSupportAnimatedVectorDrawable2531Library'. > java.lang.ExceptionInInitializerError (no error message) Build: ...
Read more >
What's this error?Cannot find solution in google : r/androiddev
FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':app:preDebugBuild'. > Could not resolve all files ...
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