最近,我们将react native集成到我们的应用程序中,只需简单的文本视图。我们在所有类型的设备上都遇到了这种崩溃。
致命异常:com.facebook.react.bridge。JSApplicationIllegalArgumentException:更新RCTView类型的阴影节点中的属性“flex”时出错在com.facebook.react.uimanager上。ViewManagersPropertyCache$PropSetter.updateShadowNodeProp(ViewManagers属性缓存.java:109)在com.facebook.react.uimanager上。ViewManagerPropertyUpdater$FallbackShadowNodeSetter.setProperty(ViewManager属性更新器.java:148)在com.facebook.react.uimanager上。ViewManagerPropertyUpdater.updateProps(ViewManager属性更新器.java:52)在com.facebook.react.uimanager上。ReactShadowNode.updateProperties(ReactShadowNode.java:222)在com.facebook.react.uimanager上。UIImplementation.createView(UIImplement.java:177)在com.facebook.react.uimanager上。UIManagerModule.createView(UIManagerModule.java:222)位于java.lang.reflect。调用方法(Method.java)在com.facebook.react.bridge上。BaseJavaModule$JavaMethod.invoke(BaseJavaModule.java:318)访问com.facebook.react.cxxbridge。调用(JavaModuleWrapper.java:158)在com.facebook.react.bridge.queue上。run(NativeRunnable.java)在android.os上。Handler.handleCallback(Handler.java:739)在android.os上。Handler.dispatchMessage(Handler.java:95)在com.facebook.react.bridge.cqueue上。消息队列线程处理程序.dispatchMessage(MessageQueueThreadHandler.java:31)在android.os上。Looper.loop(Looper.java:234)在com.facebook.react.bridge.queue上。MessageQueueThreadImpl$3.run(MessageQueue线程Impl.java:196)位于java.lang.Thread.run(Thread.java:818)由java.lang.IllegalArgumentException引起:方法com.facebook.react.uimanager。LayoutShadowNode.setFlex参数1的类型为float,得到java.lang.String位于java.lang.reflect。调用方法(Method.java)在com.facebook.react.uimanager上。ViewManagersPropertyCache$PropSetter.updateShadowNodeProp(ViewManagers属性缓存.java:99)在com.facebook.react.uimanager上。ViewManagerPropertyUpdater$FallbackShadowNodeSetter.setProperty(ViewManager属性更新器.java:148)在com.facebook.react.uimanager上。ViewManagerPropertyUpdater.updateProps(ViewManager属性更新器.java:52)在com.facebook.react.uimanager上。ReactShadowNode.updateProperties(ReactShadowNode.java:222)在com.facebook.react.uimanager上。UIImplementation.createView(UIImplement.java:177)在com.facebook.react.uimanager上。UIManagerModule.createView(UIManagerModule.java:222)位于java.lang.reflect。调用方法(Method.java)在com.facebook.react.bridge上。BaseJavaModule$JavaMethod.invoke(BaseJavaModule.java:318)访问com.facebook.react.cxxbridge。调用(JavaModuleWrapper.java:158)在com.facebook.react.bridge.queue上。run(NativeRunnable.java)在android.os上。Handler.handleCallback(Handler.java:739)在android.os上。Handler.dispatchMessage(Handler.java:95)在com.facebook.react.bridge.queue上。消息队列线程处理程序.dispatchMessage(MessageQueueThreadHandler.java:31)在android.os。Looper.loop(Looper.java:234)在com.facebook.react.bridge.queue上。MessageQueueThreadImpl$3.run(MessageQueue线程Impl.java:196)位于java.lang.Thread.run(Thread.java:818)
我们用React Native显示简单文本
'使用严格';从“React”导入React;导入{应用程序注册表,样式表,文本,查看}来自“react-native”;类HelloWorld扩展了React。组件{渲染(){返回(React Native正在运行)}}AppRegistry.registerComponent('8fit',()=>HelloWorld);
我们使用React Native0.35.0卢比
但稳定版本也出现了同样的崩溃0.33.1
.
你可以在这里找到完整的车祸报告。https://gist.github.com/sealskej/1e2398ef1cd9dda2d1b2630348fa612a
如能帮助解决问题,我们将不胜感激!