取消支付会出现app闪退
musesfish opened this issue · 7 comments
musesfish commented
bug:
安卓机取消支付会出现app闪退
"react-native-wechat": "^1.9.12",
"react": "16.9.0",
"react-native": "0.61.2",
FaiChou commented
+1
支付成功回来也会导致app闪退
FaiChou commented
有这么几个日志:
11-22 13:27:12.565 16802 16802 E AndroidRuntime: java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.rrsapp/com.demo.wxapi.WXPayEntryActivity}: java.lang.ClassNotFoundException: Didn't find class "com.demo.wxapi.WXPayEntryActivity" on path: DexPathList[[zip file "/system/framework/org.apache.http.legacy.boot.jar", zip file "/data/app/com.demo-7OwKIjNps257ZqiQMU90jw==/base.apk"],nativeLibraryDirectories=[/data/app/com.demo-7OwKIjNps257ZqiQMU90jw==/lib/arm64, /data/app/com.demo-7OwKIjNps257ZqiQMU90jw==/base.apk!/lib/arm64-v8a, /system/lib64, /product/lib64]]
11-22 13:27:12.565 16802 16802 E AndroidRuntime: Caused by: java.lang.ClassNotFoundException: Didn't find class "com.demo.wxapi.WXPayEntryActivity" on path: DexPathList[[zip file "/system/framework/org.apache.http.legacy.boot.jar", zip file "/data/app/com.demo-7OwKIjNps257ZqiQMU90jw==/base.apk"],nativeLibraryDirectories=[/data/app/com.demo-7OwKIjNps257ZqiQMU90jw==/lib/arm64, /data/app/com.demo-7OwKIjNps257ZqiQMU90jw==/base.apk!/lib/arm64-v8a, /system/lib64, /product/lib64]]
FaiChou commented
我设置过:
android:launchMode="singleTask"
FaiChou commented
我的问题解决了:
+++ b/android/app/src/main/java/com/demo/wxapi/WXPayEntryActivity.java
@@ -1,4 +1,4 @@
-package your.demo.wxapi;
+package com.demo.wxapi;
Miluaaa commented
我的问题解决了:
+++ b/android/app/src/main/java/com/demo/wxapi/WXPayEntryActivity.java @@ -1,4 +1,4 @@ -package your.demo.wxapi; +package com.demo.wxapi;
请问你这是啥意思,怎么解决的
Miluaaa commented
解决了。。原来要在包名后面添加 .wxapi 才可以。。当时没注意看
cnpmge commented
这个是哪个包名后边?哪个文件里的?