简体   繁体   English

无法在 LG Nexus 5X 上执行计费

[英]Unable to execute billing on LG Nexus 5X

My app has in-app purchases.我的应用程序有应用程序内购买。 I use the billing library:我使用计费库:

def billing_version = "4.1.0"
implementation("com.android.billingclient:billing:$billing_version")
implementation("com.android.billingclient:billing-ktx:$billing_version")

I observe in Firebase, that user with LG Nexus 5X (Android 8.1) can't make the purchase.我在 Firebase 中观察到,使用 LG Nexus 5X (Android 8.1) 的用户无法进行购买。 He tried several times, but gets the same problem :他尝试了几次,但遇到了同样的问题

致命异常

Fatal Exception: java.lang.RuntimeException: Unable to start activity ComponentInfo{studio.yatoo.calendarwidget/com.android.billingclient.api.ProxyBillingActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.IntentSender android.app.PendingIntent.getIntentSender()' on a null object reference
   at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2778)
   at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2856)
   at android.app.ActivityThread.-wrap11()
   at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1589)
   at android.os.Handler.dispatchMessage(Handler.java:106)
   at android.os.Looper.loop(Looper.java:164)
   at android.app.ActivityThread.main(ActivityThread.java:6494)
   at java.lang.reflect.Method.invoke(Method.java)
   at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)

Caused by java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.IntentSender android.app.PendingIntent.getIntentSender()' on a null object reference
   at com.android.billingclient.api.ProxyBillingActivity.onCreate(com.android.billingclient:billing@@4.1.0:11)
   at android.app.Activity.performCreate(Activity.java:7009)
   at android.app.Activity.performCreate(Activity.java:7000)
   at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1214)
   at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2731)
   at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2856)
   at android.app.ActivityThread.-wrap11()
   at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1589)
   at android.os.Handler.dispatchMessage(Handler.java:106)
   at android.os.Looper.loop(Looper.java:164)
   at android.app.ActivityThread.main(ActivityThread.java:6494)
   at java.lang.reflect.Method.invoke(Method.java)
   at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)

All other users have no such problem.所有其他用户都没有这样的问题。 Only user with LG Nexus 5X.仅限 LG Nexus 5X 用户。 Could somebody help, how to solve this problem?有人可以帮忙,如何解决这个问题?

As I stated in my comment below the question, I get the feeling this is safe to ignore.正如我在问题下方的评论中所述,我觉得忽略这一点是安全的。 My app is relatively niche, and the probability of someone with a device this old, with this OS version, making a purchase so soon is almost zero.我的应用程序相对小众,拥有这么旧的设备和这个操作系统版本的人这么快就购买的可能性几乎为零。 I wish Google would be more explicit about their automated testing devices, as I've wasted time chasing similar, seemingly impossible bugs before, but this smells like it's safe to ignore (with caution).我希望谷歌能更明确地介绍他们的自动测试设备,因为我之前曾浪费时间寻找类似的、看似不可能的错误,但这闻起来可以安全地忽略(谨慎)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM