Closed jitendra-koodo closed 4 years ago
Adding matching fallbacks also did not help.
This is my settings.gradle
include ':react-native-upi' project(':react-native-upi').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-upi/android')
rootProject.name = 'MyApp' apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings) include ':app'
Can you try react-native link
once and retry the build
From what i see on google this seems more like a gradle issue than a library issue.
Thanks Nitish for your response. I got it running by not linking it altogether (manual or one line command). I just ran the build command. All build command do the linking as well and it worked, mostly.
But after successful/cancelled transaction from Google Pay when its returning back to original app, app is crashing. In both cases, it prints the message in respective callback and app crashes.
Here is the code: what could be the reason? Thanks for your help. Appreciated.
const floo = () => { ToastAndroid.show('Button pressed', ToastAndroid.SHORT); RNUpiPayment.initializePayment({ vpa: 'myupi@yesbank', // or can be john@ybl or mobileNo@upi payeeName: 'Jitendra', amount: '1', transactionRef: '1234321' },successCallback,failureCallback); }
const failureCallback = (data) => { console.log("failure 3"); console.log(data); } const successCallback = (data) => { console.log("success 3"); console.log(data); }
Can you do an adb logcat debug to see what the logs are when it crashes?
closing this as i dont see it as a build error, for the crash you could open another issue.
I'm following manual instructions as "link" did not work but getting this error:
FAILURE: Build failed with an exception.