diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/ViewManagerRegistry.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/ViewManagerRegistry.java index 1f3c219250a71f..418a52ec77cfda 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/ViewManagerRegistry.java +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/ViewManagerRegistry.java @@ -53,10 +53,18 @@ public ViewManagerRegistry(Map viewManagerMap) { * @return the {@link ViewManager} registered to the className received as a parameter */ public synchronized ViewManager get(String className) { + // 1. Try to get the manager without the prefix. ViewManager viewManager = mViewManagers.get(className); if (viewManager != null) { return viewManager; } + + // 2. Try to get the manager with the RCT prefix. + String rctViewManagerName = "RCT" + className; + viewManager = mViewManagers.get(rctViewManagerName); + if (viewManager != null) { + return viewManager; + } if (mViewManagerResolver != null) { viewManager = getViewManagerFromResolver(className); if (viewManager != null) return viewManager;