toLowerCase 上的 NullPointer 但我不在任何地方使用该方法 [英] NullPointer on toLowerCase but I don't use that method anywhere

查看:26
本文介绍了toLowerCase 上的 NullPointer 但我不在任何地方使用该方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 Firebase 崩溃报告中收到以下崩溃转储:

I'm getting the following crash dump in Firebase Crash Reports:

Exception java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String java.lang.String.toLowerCase(java.util.Locale)' on a null object reference
bnp.run (bnp.java:56)
java.lang.Thread.run (Thread.java:818)

问题是我没有在项目的任何地方使用 String.toLowerCase() 方法.在 Android Studio 中,我为该方法执行了 Edit->Find In Path 并没有得到任何结果,但是,如果我在库中搜索,它确实出现了 100 多次.但是我在任何地方都找不到bnp.java".

The problem is that I don't use the String.toLowerCase() method anywhere in the project. In Android Studio, I did Edit->Find In Path for the method and got no results, however, it does appear 100+ times if I search in the libraries. But I cannot find the "bnp.java" anywhere.

感谢您的帮助!

编辑:之前的崩溃报告没有受到 proguard 的影响,并透露可能是由于 google-play-services 或 Firebase.我只在我的应用中使用 gms:play-services-places 和 gms:play-services-auth,以及许多 Firebase 依赖项.

Edit: A previous crash report was not proguard-affected and revealed it may be due to google-play-services or Firebase. I only use gms:play-services-places and gms:play-services-auth in my app, along with many Firebase dependencies.

Exception java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String java.lang.String.toLowerCase(java.util.Locale)' on a null object reference
bnp.run (:com.google.android.gms.DynamiteModulesC:56)
java.lang.Thread.run (Thread.java:818)

推荐答案

我还不能发表评论,所以我会将此作为可能的解决方案发布,但这在 Google 方面似乎是一个错误.多人在具有完全相同区域的完全相同的设备上报告此崩溃.因此,Google 似乎在虚拟或自动化设备上运行您的应用,然后该设备崩溃了.此设备似乎是 Nexus 5x,本地 US-US 和 API 级别 23.

I can't comment yet, so I will post this as a possible solution, but this seems like an error on Google's side. Multiple people are reporting this crash on the exact same device with the exact same region. So it seems Google runs your app on a virtual or automated device and then that device crashes. This device seems to be a Nexus 5x with local us-US and API level 23.

来源:https://code.google.com/p/android/issues/detail?id=233549

这篇关于toLowerCase 上的 NullPointer 但我不在任何地方使用该方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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