We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
我们 APP 跳转的时候,有的场景没有传入 context 参数。
理论上 getApplicationContext() 通过 ContentProvider 初始化后赋值,应该不为 null,但是线上还是上报了少量的空指针。 线上也打印了日志, getApplicationContext() 确实为 null。
目前我的解决方案:
不过,建议底层的 nagavitor() 方法还是应该兜个底,或者 为 null 的时候直接抛异常,排查问题也会更加方便。
The text was updated successfully, but these errors were encountered:
多进程的情况吧,子进程需要手动setContext()
setContext()
Sorry, something went wrong.
应该不是,这个问题只有几十个用户出现了,不是必现的,否则就是大面积了,而且路由跳转的地方在主进程。比较困惑..
1.2.3-rc5加了逻辑判断,但只能保证release环境不崩溃,debug环境主动抛异常。为空的情况应该还是系统回收了,需要考虑一下怎么避免。
1.2.3-rc5
release
debug
No branches or pull requests
我们 APP 跳转的时候,有的场景没有传入 context 参数。
理论上 getApplicationContext() 通过 ContentProvider 初始化后赋值,应该不为 null,但是线上还是上报了少量的空指针。
线上也打印了日志, getApplicationContext() 确实为 null。
目前我的解决方案:
不过,建议底层的 nagavitor() 方法还是应该兜个底,或者 为 null 的时候直接抛异常,排查问题也会更加方便。
The text was updated successfully, but these errors were encountered: