java - "java.lang.IllegalStateException: Cannot perform this action on a sealed instance."致命异常 : main

标签 java android google-play

我在 Playstore 控制台的发布前报告中收到此错误。
我无法在我尝试的任何真实设备上生成此崩溃。
发布前报告中的设备是三星 s9 (Android 8.0)。
这是堆栈跟踪:

FATAL EXCEPTION: main
java.lang.IllegalStateException: Cannot perform this action on a sealed instance.
    at android.view.accessibility.AccessibilityNodeInfo.enforceNotSealed(AccessibilityNodeInfo.java:2992)
    at android.view.accessibility.AccessibilityNodeInfo.setSource(AccessibilityNodeInfo.java:818)
    at android.view.accessibility.AccessibilityNodeInfo.setSource(AccessibilityNodeInfo.java:795)
    at android.view.accessibility.AccessibilityNodeInfo.obtain(AccessibilityNodeInfo.java:3008)
    at android.view.View.createAccessibilityNodeInfoInternal(View.java:7897)
    at android.view.View.createAccessibilityNodeInfo(View.java:7883)
    at android.view.AccessibilityInteractionController$AccessibilityNodePrefetcher.prefetchDescendantsOfRealNode(AccessibilityInteractionController.java:1051)
    at android.view.AccessibilityInteractionController$AccessibilityNodePrefetcher.prefetchAccessibilityNodeInfos(AccessibilityInteractionController.java:876)
    at android.view.AccessibilityInteractionController.findAccessibilityNodeInfoByAccessibilityIdUiThread(AccessibilityInteractionController.java:199)
    at android.view.AccessibilityInteractionController.-wrap1(Unknown Source:0)
    at android.view.AccessibilityInteractionController$PrivateHandler.handleMessage(AccessibilityInteractionController.java:1225)
    at android.os.Handler.dispatchMessage(Handler.java:105)
    at android.os.Looper.loop(Looper.java:164)
    at android.app.ActivityThread.main(ActivityThread.java:6938)
    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)

最佳答案

在没有看到更多代码的情况下,我建议您查看以下链接以尝试确定确切原因。
https://stackoverflow.com/a/57964014/5779200

When updating values for AccessibilityNodeInfo it has been seen that calling .getClassName() to see if the value is NULL can help prevent this error.


https://stackoverflow.com/a/32829963/5779200

Similar to the previous, If you are changing the text of an accessibilityNodeInfo you can check to see if it's sealed by calling isSealed(). on the AccessibilityNodeInfo object

关于java - "java.lang.IllegalStateException: Cannot perform this action on a sealed instance."致命异常 : main,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/68649888/

相关文章:

android - 申请报告需要很长时间才能更新

java - 蜜 jar 样本测试奇数问题

java - 如何使用三个文本字段获取 JOptionPane

java - Apache POI 复制时更新公式引用

java - Android 5 中的图像内存不足

java - 为什么 Google Play 说我的应用与其应该运行的设备不兼容?

android.permission.WRITE_SETTINGS 无法在 list 中使用

安卓12 : BLE Scan does not find any devices

android - 如何在android中制作单实例应用程序?

android - 应用计费测试