I am trying to resolve a problem while starting payment with Razorpay and getting below error when I hit the checkout button. I have tried all the option available on Google but nothing worked. I know this seems a duplicate question but I tried those options that's why I am putting this at last. Please help me with this thanks.
Razorpay package which I am using razorpay_flutter
Accessing hidden method Llibcore/io/ForwardingOs;->getenv(Ljava/lang/String;)Ljava/lang/String; (greylist, reflection, allowed)
W/com.package(31557): Opening an oat file without a class loader. Are you using the deprecated DexFile APIs?
D/AndroidRuntime(31557): Shutting down VM
E/AndroidRuntime(31557): FATAL EXCEPTION: main
E/AndroidRuntime(31557): Process: com.package, PID: 31557
E/AndroidRuntime(31557): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.package/com.razorpay.CheckoutActivity}: java.lang.ClassNotFoundException: Didn't find class "com.razorpay.G__G_" on path: DexPathList[[zip file "/data/app/com.package==/base.apk"],nativeLibraryDirectories=[/data/app/com.package==/lib/arm64, /data/app/com.package==/base.apk!/lib/arm64-v8a, /system/lib64]]
E/AndroidRuntime(31557): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3448)
E/AndroidRuntime(31557): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3595)
E/AndroidRuntime(31557): at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:83)
E/AndroidRuntime(31557): at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
E/AndroidRuntime(31557): at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
E/AndroidRuntime(31557): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2147)
E/AndroidRuntime(31557): at android.os.Handler.dispatchMessage(Handler.java:107)
E/AndroidRuntime(31557): at android.os.Looper.loop(Looper.java:237)
E/AndroidRuntime(31557): at android.app.ActivityThread.main(ActivityThread.java:7814)
E/AndroidRuntime(31557): at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime(31557): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
E/AndroidRuntime(31557): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1075)
E/AndroidRuntime(31557): Caused by: java.lang.ClassNotFoundException: Didn't find class "com.razorpay.G__G_" on path: DexPathList[[zip file "/data/app/com.package==/base.apk"],nativeLibraryDirectories=[/data/app/com.package==/lib/arm64, /data/app/com.package==/base.apk!/lib/arm64-v8a, /system/lib64]]
E/AndroidRuntime(31557): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:196)
E/AndroidRuntime(31557): at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
E/AndroidRuntime(31557): at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
E/AndroidRuntime(31557): at com.razorpay.h__y_.G__G_(:1100)
E/AndroidRuntime(31557): at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime(31557): at com.razorpay.a0.<clinit>(:204)
E/AndroidRuntime(31557): at com.razorpay.a0.a(Unknown Source:0)
E/AndroidRuntime(31557): at com.razorpay.d.f(:189)
E/AndroidRuntime(31557): at com.razorpay.h.e(:427)
E/AndroidRuntime(31557): at com.razorpay.y0.onCreate(:80)
E/AndroidRuntime(31557): at com.razorpay.f.onCreate(:23)
E/AndroidRuntime(31557): at com.razorpay.CheckoutActivity.onCreate(:8)
E/AndroidRuntime(31557): at android.app.Activity.performCreate(Activity.java:7955)
E/AndroidRuntime(31557): at android.app.Activity.performCreate(Activity.java:7944)
E/AndroidRuntime(31557): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1307)
Proguard Rules:
-keepclassmembers class * {
@android.webkit.JavascriptInterface <methods>;
}
-keepattributes JavascriptInterface
-keepattributes *Annotation*
-dontwarn com.razorpay.**
-keep class com.razorpay.** {*;}
-optimizations !method/inlining/*
-keepclasseswithmembers class * {
public void onPayment*(...);
}
Try increasing your in android/app/build.gradle