You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

React Native 0.68.2打包AAB上传谷歌商店后出现PayFactoryResetReceiver异常求助

React Native 0.68.2 打包AAB后Google Play审核出现Google Pay Receiver初始化异常

我开发了一个React Native 0.68.2版本的应用,打包成.aab文件上传至Google Play Console后,审核测试环节出现如下异常,无法定位问题原因,恳请各位提供帮助:

Exception java.lang.RuntimeException: Unable to start receiver com.google.android.gms.pay.factoryreset.PayFactoryResetReceiver: fnqb: lateinit property executor has not been initialized
  at android.app.ActivityThread.handleReceiver (ActivityThread.java:4458)
  at android.app.ActivityThread.-$$Nest$mhandleReceiver
  at android.app.ActivityThread$H.handleMessage (ActivityThread.java:2256)
  at android.os.Handler.dispatchMessage (Handler.java:106)
  at android.os.Looper.loopOnce (Looper.java:205)
  at android.os.Looper.loop (Looper.java:294)
  at android.app.ActivityThread.main (ActivityThread.java:8177)
  at java.lang.reflect.Method.invoke
  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:552)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:971)
Caused by fnqb: lateinit property executor has not been initialized
  at com.google.android.gms.pay.factoryreset.PayFactoryResetChimeraReceiver.a (:com.google.android.gms@235014038@23.50.14 (190400-592568214):8)
  at com.google.android.gms.pay.factoryreset.PayFactoryResetChimeraReceiver.onReceive (:com.google.android.gms@235014038@23.50.14 (190400-592568214):921)
  at ahbu.a (:com.google.android.gms@235014038@23.50.14 (190400-592568214):34)
  at ocl.onReceive (:com.google.android.gms@235014038@23.50.14 (190400-592568214):32)
  at android.app.ActivityThread.handleReceiver (ActivityThread.java:4449)

可能的解决方案:

  • 检查Google Play Services依赖版本:这个异常来自Google Play Services的pay模块,大概率是依赖版本不兼容导致的。打开项目的android/build.gradle或android/app/build.gradle,查看com.google.android.gms:play-services-pay的版本,尝试升级到稳定版本(比如18.1.0及以上),同时确保项目中所有Google Play Services相关依赖版本保持一致。
  • 修复ProGuard/R8混淆规则:如果开启了代码混淆,可能是混淆规则误删了Google Pay相关类的初始化代码。在android/app/proguard-rules.pro中添加以下规则:
    -keep class com.google.android.gms.pay.** { *; }
    -keep class fnqb { *; }
    
  • 移除不必要的Google Pay集成:如果你的应用根本没用到Google Pay功能,检查是否误引入了相关依赖,或者AndroidManifest.xml中是否注册了PayFactoryResetReceiver,直接移除这些冗余配置和依赖即可。
  • 验证打包配置:确认打包AAB时没有遗漏必要的依赖,比如是否启用了动态特性模块导致Google Play Services模块未被正确包含,或者split APK的配置导致依赖缺失。
  • 本地复现测试:下载Google Play预发布版本的AAB包,在本地测试机上模拟设备重置操作,看是否能复现该异常,方便进一步定位问题根源。

内容的提问来源于stack exchange,提问作者Antoni0Zac

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.01 09:15:09