Razorpay在paymet页面上崩溃,没有在波动中找到类“ com.razorpay.d__1 _”

问题描述 投票:0回答:1

我正在使用此插件https://pub.dev/packages/razorpay_flutterRazorpay在付款页面上崩溃

flutter run在仿真器和真实设备中运行正常。但在flutter build apk之后,_razorpay.open(options);上的应用程序Crashed并且该插件未在Visual Studio代码终端中显示崩溃报告或任何错误。

  final _razorpay = Razorpay();
 _razorpay.on(Razorpay.EVENT_PAYMENT_SUCCESS, _handlePaymentSuccess);
  _razorpay.on(Razorpay.EVENT_PAYMENT_ERROR, _handlePaymentError);
 _razorpay.on(Razorpay.EVENT_EXTERNAL_WALLET, _handleExternalWallet);

  var options = {
      'key': 'rzp_test_xxxxxxx',
      'amount': 100, //in the smallest currency sub-unit.
      'name': 'Acme Corp.',
      'description': 'Fine T-Shirt',
      'prefill': {'contact': '9123456789', 'email': '[email protected]'}
    };

    print('0');
 try {
      print('1');
      _razorpay.open(options);
      print('2');
    } catch (e) {
      print('error');
      debugPrint(e);
    }

在Visual Studio代码终端中]

11-05 00:22:29.197 21170 21209 I flutter : 0
11-05 00:22:29.197 21170 21209 I flutter : 1
11-05 00:22:29.197 21170 21209 I flutter : 2

在Andoid工作室日志中>

java.lang.ClassNotFoundException:找不到类“ com.razorpay.d__1 _”

2019-11-05 11:59:49.168 30159-30159/? E/AndroidRuntime: FATAL EXCEPTION: main
    Process: com.example.my_task, PID: 30159
    java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.my_task/com.razorpay.CheckoutActivity}: 
java.lang.ClassNotFoundException: Didn't find class "com.razorpay.d__1_" on path: DexPathList[[zip file "/data/app/com.example.my_task-OX9pWhAo1dl4QP0DQBF58w==/base.apk"],nativeLibraryDirectories=[/data/app/com.example.my_task-OX9pWhAo1dl4QP0DQBF58w==/lib/arm64, /data/app/com.example.my_task-OX9pWhAo1dl4QP0DQBF58w==/base.apk!/lib/arm64-v8a, /system/lib64, /system/vendor/lib64]]
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2957)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3032)
        at android.app.ActivityThread.-wrap11(Unknown Source:0)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1696)
        at android.os.Handler.dispatchMessage(Handler.java:105)
        at android.os.Looper.loop(Looper.java:164)
        at android.app.ActivityThread.main(ActivityThread.java:6944)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)
     Caused by: java.lang.ClassNotFoundException: Didn't find class "com.razorpay.d__1_" on path: DexPathList[[zip file "/data/app/com.example.my_task-OX9pWhAo1dl4QP0DQBF58w==/base.apk"],nativeLibraryDirectories=[/data/app/com.example.my_task-OX9pWhAo1dl4QP0DQBF58w==/lib/arm64, /data/app/com.example.my_task-OX9pWhAo1dl4QP0DQBF58w==/base.apk!/lib/arm64-v8a, /system/lib64, /system/vendor/lib64]]
        at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:93)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
        at com.razorpay.Y_$B$.Q_$2$(:1112)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.razorpay.A.<clinit>(:204)
        at com.razorpay.A.a(Unknown Source:0)
        at com.razorpay.c.b(:189)
        at com.razorpay.h.b(:412)
        at com.razorpay.ja.onCreate(:82)
        at com.razorpay.u.onCreate(:23)
        at com.razorpay.CheckoutActivity.onCreate(:8)
        at android.app.Activity.performCreate(Activity.java:7183)
        at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1220)

我正在使用此插件https://pub.dev/packages/razorpay_flutter付款页面上的Razorpay崩溃在仿真器和真实设备中,抖动运行正常。但是在flutter构建apk之后,...

android flutter flutter-dependencies razorpay
1个回答
0
投票

我只是按照以下步骤解决此问题。

1步

© www.soinside.com 2019 - 2024. All rights reserved.