我正在尝试启动由gradle在Android设备上构建的react native应用。在模拟器(Android 9)和真实设备(Android 8.1.0)上均使用react-native android-start启动应用程序失败,并显示以下错误。 我已经尝试过重建应用程序,rm -rf并重新安装项目中的所有节点模块,但是没有成功。
E/unknown:ReactNative: Exception in native call
java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Class[] java.lang.Class.getInterfaces()' on a null object reference
at com.facebook.react.uimanager.ViewManagersPropertyCache.getNativePropSettersForShadowNodeClass(ViewManagersPropertyCache.java:336)
at com.facebook.react.uimanager.ViewManagersPropertyCache.getNativePropSettersForShadowNodeClass(ViewManagersPropertyCache.java:347)
at com.facebook.react.uimanager.ViewManagerPropertyUpdater$FallbackShadowNodeSetter.<init>(ViewManagerPropertyUpdater.java:150)
at com.facebook.react.uimanager.ViewManagerPropertyUpdater$FallbackShadowNodeSetter.<init>(ViewManagerPropertyUpdater.java:144)
at com.facebook.react.uimanager.ViewManagerPropertyUpdater.findNodeSetter(ViewManagerPropertyUpdater.java:97)
at com.facebook.react.uimanager.ViewManagerPropertyUpdater.getNativeProps(ViewManagerPropertyUpdater.java:70)
at com.facebook.react.uimanager.ViewManager.getNativeProps(ViewManager.java:203)
at com.facebook.react.uimanager.UIManagerModuleConstantsHelper.createConstantsForViewManager(UIManagerModuleConstantsHelper.java:145)
at com.facebook.react.uimanager.UIManagerModuleConstantsHelper.createConstants(UIManagerModuleConstantsHelper.java:92)
at com.facebook.react.uimanager.UIManagerModule.createConstants(UIManagerModule.java:262)
at com.facebook.react.uimanager.UIManagerModule.<init>(UIManagerModule.java:181)
at com.facebook.react.uimanager.UIManagerModule.<init>(UIManagerModule.java:143)
at com.facebook.react.CoreModulesPackage.createUIManager(CoreModulesPackage.java:170)
at com.facebook.react.CoreModulesPackage.access$200(CoreModulesPackage.java:53)
at com.facebook.react.CoreModulesPackage$7.get(CoreModulesPackage.java:128)
at com.facebook.react.CoreModulesPackage$7.get(CoreModulesPackage.java:125)
at com.facebook.react.NativeModuleRegistryBuilder.processPackage(NativeModuleRegistryBuilder.java:61)
at com.facebook.react.ReactInstanceManager.processPackage(ReactInstanceManager.java:1173)
at com.facebook.react.ReactInstanceManager.processPackages(ReactInstanceManager.java:1143)
at com.facebook.react.ReactInstanceManager.createReactContext(ReactInstanceManager.java:1085)
at com.facebook.react.ReactInstanceManager.access$900(ReactInstanceManager.java:117)
at com.facebook.react.ReactInstanceManager$5.run(ReactInstanceManager.java:916)
at java.lang.Thread.run(Thread.java:764)
此错误的可能原因是什么,我应该去哪里看?