com.android.server.autofill.RemoteFillService$PendingRequest.cancel() 上的 NPE [英] NPE on com.android.server.autofill.RemoteFillService$PendingRequest.cancel()

查看:24
本文介绍了com.android.server.autofill.RemoteFillService$PendingRequest.cancel() 上的 NPE的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Crashlytics 报告与自动填充相关的 NullPointerException,如下所示:

Crashlytics is reporting NullPointerException related to Auto Fill as shown below:

Fatal Exception: java.lang.NullPointerException: Attempt to invoke virtual method
'boolean com.android.server.autofill.RemoteFillService$PendingRequest.cancel()' on a null object reference
  at android.os.Parcel.readException(Parcel.java:1965)
  at android.os.Parcel.readException(Parcel.java:1905)
  at android.app.IActivityManager$Stub$Proxy.reportAssistContextExtras(IActivityManager.java:8297)
  at android.app.ActivityThread.handleRequestAssistContextExtras(ActivityThread.java:3210)
  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1913)
  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(Method.java)
  at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)
  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)

Caused by android.os.RemoteException: Remote stack trace:
  at com.android.server.autofill.RemoteFillService.cancelCurrentRequest(RemoteFillService.java:177)
  at com.android.server.autofill.Session.cancelCurrentRequestLocked(Session.java:465)
  at com.android.server.autofill.Session.access$1000(Session.java:118)
  at com.android.server.autofill.Session$1.onHandleAssistData(Session.java:322)
  at com.android.server.am.ActivityManagerService.reportAssistContextExtras(ActivityManagerService.java:14713)

但是,堆栈不包含我的应用程序中的任何内容,但我这边发生了崩溃.

However, the stack does not include anything from my app yet crash is happening on my side.

推荐答案

这不是您的应用的问题,而是特定的 Android OEM 的问题.似乎在三星设备上更频繁地发生,而在像素设备上看不到.这是向 Google 提交的问题报告,该报告已关闭为无法修复".https://issuetracker.google.com/issues/123311621

This is not an issue with your app but with specific Android OEMs. Seems to be happening more frequently on Samsung Devices and not seen on Pixel Devices. Here is an issue report to Google which is closed as 'Won't Fix'. https://issuetracker.google.com/issues/123311621

由于自动填充导致崩溃.我建议通过将 importanForAutofill 设置为 false/no 来禁用特定视图的自动填充.https://developer.android.com/reference/android/R.attr.html#importantForAutofill

Since the crash is happening because of autofill. I would recommend disabling autofill for the specific view by setting importanForAutofill as false/no. https://developer.android.com/reference/android/R.attr.html#importantForAutofill

这篇关于com.android.server.autofill.RemoteFillService$PendingRequest.cancel() 上的 NPE的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆