react-native:将应用程序从 0.28 迁移到 0.29。更新 属性 'src' 管理的视图时出错:RCTImageView

react-native: migrate app from 0.28 to 0.29. Error while updating property 'src' of a view managed by: RCTImageView

一天中的好时光。 我将 reacte-native 更新为 0.29,现在启动应用程序时出错。 Error while updating property 'src' of a view managed by: RCTImageView

我是 react-native 和 android 开发的新手,该应用程序已由另一位开发人员完成。我不知道去哪里了解这个问题。

亚行 logcat | grep 反应

07-15 13:38:26.274  2350  2350 W unknown:React: Unable to dispatch keyboard events in JS as the react instance has not been attached
07-15 13:38:30.784  2350  2364 W unknown:React: The packager does not seem to be running as we got an IOException requesting its status: failed to connect to /10.0.2.2 (port 8081) after 5000ms
07-15 13:38:30.867  2350  2369 W unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.picker.ReactDialogPickerManager
07-15 13:38:30.869  2350  2369 W unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.drawer.ReactDrawerLayoutManager
07-15 13:38:30.871  2350  2369 W unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.picker.ReactDropdownPickerManager
07-15 13:38:30.871  2350  2369 W unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.scroll.ReactHorizontalScrollViewManager
07-15 13:38:30.872  2350  2369 W unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.image.ReactImageManager
07-15 13:38:30.873  2350  2369 W unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.modal.ReactModalHostManager
07-15 13:38:30.874  2350  2369 W unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.progressbar.ReactProgressBarViewManager
07-15 13:38:30.875  2350  2369 W unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.text.ReactRawTextManager
07-15 13:38:30.875  2350  2369 W unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.text.ReactTextShadowNode
07-15 13:38:30.876  2350  2369 W unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.scroll.ReactScrollViewManager
07-15 13:38:30.879  2350  2369 W unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.slider.ReactSliderManager
07-15 13:38:30.879  2350  2369 W unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.slider.ReactSliderManager$ReactSliderShadowNode
07-15 13:38:30.880  2350  2369 W unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.switchview.ReactSwitchManager
07-15 13:38:30.880  2350  2369 W unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.switchview.ReactSwitchManager$ReactSwitchShadowNode
07-15 13:38:30.881  2350  2369 W unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.text.frescosupport.FrescoBasedReactTextInlineImageViewManager
07-15 13:38:30.881  2350  2369 W unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.text.frescosupport.FrescoBasedReactTextInlineImageShadowNode
07-15 13:38:30.882  2350  2369 W unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.textinput.ReactTextInputManager
07-15 13:38:30.886  2350  2369 W unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.textinput.ReactTextInputShadowNode
07-15 13:38:30.886  2350  2369 W unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.text.ReactTextViewManager
07-15 13:38:30.887  2350  2369 W unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.toolbar.ReactToolbarManager
07-15 13:38:30.889  2350  2369 W unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.view.ReactViewManager
07-15 13:38:30.890  2350  2369 W unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.viewpager.ReactViewPagerManager
07-15 13:38:30.891  2350  2369 W unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.text.ReactVirtualTextViewManager
07-15 13:38:30.892  2350  2369 W unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.webview.ReactWebViewManager
07-15 13:38:30.894  2350  2369 W unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.mapbox.reactnativemapboxgl.ReactNativeMapboxGLManager
07-15 13:38:30.902  2350  2369 D ReactNativeMapboxGLModule: Context com.facebook.react.bridge.ReactApplicationContext@5414d24
07-15 13:38:30.902  2350  2369 D ReactNativeMapboxGLModule: reactContext com.facebook.react.bridge.ReactApplicationContext@5414d24
07-15 13:38:31.098  2350  2371 I ReactNativeJS: Running application "rest" with appParams: {"initialProps":{},"rootTag":1}. __DEV__ === false, development-level warning are OFF, performance optimizations are ON
07-15 13:38:32.569  2350  2350 E unknown:ViewManager:   at com.facebook.react.uimanager.ReactStylesDiffMap.getArray(ReactStylesDiffMap.java:77)
07-15 13:38:32.569  2350  2350 E unknown:ViewManager:   at com.facebook.react.uimanager.ReactChoreographer$ReactChoreographerDispatcher.doFrame(ReactChoreographer.java:125)
07-15 13:38:32.571  2350  2350 E unknown:React: Exception in native call from JS
07-15 13:38:32.571  2350  2350 E unknown:React: com.facebook.react.bridge.JSApplicationIllegalArgumentException: Error while updating property 'src' of a view managed by: RCTImageView
07-15 13:38:32.571  2350  2350 E unknown:React:     at com.facebook.react.uimanager.ViewManagersPropertyCache$PropSetter.updateViewProp(ViewManagersPropertyCache.java:88)
07-15 13:38:32.571  2350  2350 E unknown:React:     at com.facebook.react.uimanager.ViewManagerPropertyUpdater$FallbackViewManagerSetter.setProperty(ViewManagerPropertyUpdater.java:123)
07-15 13:38:32.571  2350  2350 E unknown:React:     at com.facebook.react.uimanager.ViewManagerPropertyUpdater.updateProps(ViewManagerPropertyUpdater.java:42)
07-15 13:38:32.571  2350  2350 E unknown:React:     at com.facebook.react.uimanager.ViewManager.updateProperties(ViewManager.java:34)
07-15 13:38:32.571  2350  2350 E unknown:React:     at com.facebook.react.uimanager.NativeViewHierarchyManager.createView(NativeViewHierarchyManager.java:215)
07-15 13:38:32.571  2350  2350 E unknown:React:     at com.facebook.react.uimanager.UIViewOperationQueue$CreateViewOperation.execute(UIViewOperationQueue.java:148)
07-15 13:38:32.571  2350  2350 E unknown:React:     at com.facebook.react.uimanager.UIViewOperationQueue$DispatchUIFrameCallback.dispatchPendingNonBatchedOperations(UIViewOperationQueue.java:874)
07-15 13:38:32.571  2350  2350 E unknown:React:     at com.facebook.react.uimanager.UIViewOperationQueue$DispatchUIFrameCallback.doFrameGuarded(UIViewOperationQueue.java:847)
07-15 13:38:32.571  2350  2350 E unknown:React:     at com.facebook.react.uimanager.GuardedChoreographerFrameCallback.doFrame(GuardedChoreographerFrameCallback.java:32)
07-15 13:38:32.571  2350  2350 E unknown:React:     at com.facebook.react.uimanager.ReactChoreographer$ReactChoreographerDispatcher.doFrame(ReactChoreographer.java:125)
07-15 13:38:32.571  2350  2350 E unknown:React:     at android.view.Choreographer$CallbackRecord.run(Choreographer.java:856)
07-15 13:38:32.571  2350  2350 E unknown:React:     at android.view.Choreographer.doCallbacks(Choreographer.java:670)
07-15 13:38:32.571  2350  2350 E unknown:React:     at android.view.Choreographer.doFrame(Choreographer.java:603)
07-15 13:38:32.571  2350  2350 E unknown:React:     at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:844)
07-15 13:38:32.571  2350  2350 E unknown:React:     at android.os.Handler.handleCallback(Handler.java:739)
07-15 13:38:32.571  2350  2350 E unknown:React:     at android.os.Handler.dispatchMessage(Handler.java:95)
07-15 13:38:32.571  2350  2350 E unknown:React:     at android.os.Looper.loop(Looper.java:148)
07-15 13:38:32.571  2350  2350 E unknown:React:     at android.app.ActivityThread.main(ActivityThread.java:5417)
07-15 13:38:32.571  2350  2350 E unknown:React:     at java.lang.reflect.Method.invoke(Native Method)
07-15 13:38:32.571  2350  2350 E unknown:React:     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
07-15 13:38:32.571  2350  2350 E unknown:React:     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
07-15 13:38:32.571  2350  2350 E unknown:React: Caused by: com.facebook.react.bridge.UnexpectedNativeTypeException: expected Array, got a string
07-15 13:38:32.571  2350  2350 E unknown:React:     at com.facebook.react.bridge.ReadableNativeMap.getArray(Native Method)
07-15 13:38:32.571  2350  2350 E unknown:React:     at com.facebook.react.bridge.ReadableNativeMap.getArray(ReadableNativeMap.java:23)
07-15 13:38:32.571  2350  2350 E unknown:React:     at com.facebook.react.uimanager.ReactStylesDiffMap.getArray(ReactStylesDiffMap.java:77)
07-15 13:38:32.571  2350  2350 E unknown:React:     at com.facebook.react.uimanager.ViewManagersPropertyCache$ArrayPropSetter.extractProperty(ViewManagersPropertyCache.java:200)
07-15 13:38:32.571  2350  2350 E unknown:React:     at com.facebook.react.uimanager.ViewManagersPropertyCache$PropSetter.updateViewProp(ViewManagersPropertyCache.java:76)
07-15 13:38:32.571  2350  2350 E unknown:React:     ... 20 more

更新:

我已经初始化了新应用程序并交替将源代码移至它,当我将文件夹 android/app/src/main/assets 移动到文件夹 fonts 和文件 index.android.bundle 时,问题重现。

所以,我不确定,但是当我用 react-native 0.29.2 重新安装 node_modules 时,问题就解决了。

重新安装包没有解决问题。如果我先 运行 react-native start,然后 react-native run-android.

,应用程序工作