joc*_*ers 5 debugging crash-reports crashlytics react-native react-native-android
在 React Native 应用程序的生产中,从 firebase 的 crashlytics 获取 Android 上的错误:
Fatal exception: com.facebook.react.uimanager.IllegalViewOperationException.
Trying to update non-existent view with tag 85273.
Run Code Online (Sandbox Code Playgroud)
并且没有崩溃的情况,因此无法检测到它。我在模拟器和真正的 Android 设备上检查了很多次。
我们从这次事故中发现了什么?
public void updateView(int tag, String className, ReadableMap props) {
ViewManager viewManager = mViewManagers.get(className);
if (viewManager == null) {
throw new IllegalViewOperationException("Got unknown view type: " + className);
}
ReactShadowNode cssNode = mShadowNodeRegistry.getNode(tag);
if (cssNode == null) {
throw new IllegalViewOperationException("Trying to update non-existent view with tag " + tag);
}
if (props != null) {
ReactStylesDiffMap styles = new ReactStylesDiffMap(props);
cssNode.updateProperties(styles);
handleUpdateView(cssNode, className, styles);
}
}
Run Code Online (Sandbox Code Playgroud)
如何通过标签号 85273 找到 JS 中的元素?或者也许有人可以推荐我一些文章或分享您的经验,如何在 React Native 应用程序的 Android 中解决这种崩溃。提前致谢。
| 归档时间: |
|
| 查看次数: |
365 次 |
| 最近记录: |