Rishav Kumar
Rishav Kumar

Reputation: 5460

Razor Pay crashes on android platform in release mode. It works fine on debug mode

Razor Pay is crashing in android on some devices in the release mode. Everything seems to work fine when we are on the debug mode but it crashes on the release mode.

Didn't find class "com.razorpay.G_G" on path: DexPathList[[zip file "/data/app/in.abc.app-6JaCLtUU8i_xpQjmYbg4bQ==/base.apk", zip file "/data/app/in.abc.app-6JaCLtUU8i_xpQjmYbg4bQ==/split_config.armeabi_v7a.apk", zip file "/data/app/in.abc.app-6JaCLtUU8i_xpQjmYbg4bQ==/split_config.en.apk",

Please help.

"react-native-razorpay": "^2.1.25",

"react-native": "^0.59.8",

The Android OS is Android PI and device name is Samsung S10

Upvotes: 0

Views: 1377

Answers (1)

Rishav Kumar
Rishav Kumar

Reputation: 5460

Please add below to your proguard configuration:

-keepattributes *Annotation*
-dontwarn com.razorpay.**
-keep class com.razorpay.** {*;}
-optimizations !method/inlining/
-keepclasseswithmembers class * {
  public void onPayment*(...);
}

This will cause razorpay references in your code to not be minified.

This will solve the issue if anyone faces this.

Upvotes: 5

Related Questions