razorpay / react-native-razorpay

React Native wrapper for Razorpay's mobile SDKs
https://www.npmjs.com/package/react-native-razorpay
MIT License
121 stars 107 forks source link

Not able to run android app with react-native-customui #405

Open vinaysgl opened 2 years ago

vinaysgl commented 2 years ago

error: local variable currentActivity is accessed from within inner class; needs to be declared final

Description

Please provide a clear and concise description of what the bug is. Include screenshots if needed. Please test using the latest React Native Razorpay plugin release to make sure your issue has not already been fixed.

Razorpay Package Version :

Open Package.json. > 2.2.1

Java and Gradle Version (android) :

Specify your Java and Gradle version.

What you did:

What happened:

Steps To Reproduce

Provide a detailed list of steps that reproduce the issue.

1. 2.

Suggested solution:

Code example, screenshot, or link to a repository:

Please provide a link to a repository on GitHub, or provide a minimal code example that reproduces the problem. You may provide a screenshot of the application if you think it is relevant to your bug report. Here are some tips for providing a minimal example: https://stackoverflow.com/help/mcve

kartikMygoldkart commented 2 years ago

open android studio and build the project it will show you error in custom ui sdk just go with make variable final it worked for me in RazorpayModule.java change line 85-86 to this @ReactMethod public void initRazorpay(final String key){ final Activity currentActivity = getCurrentActivity();

kkyusufk commented 1 year ago

@vinaysgl Is this issue resolved? We can close it out then.