diff --git a/ReactAndroid/src/main/java/com/facebook/react/ReactActivityDelegate.java b/ReactAndroid/src/main/java/com/facebook/react/ReactActivityDelegate.java index 1fa606be8d2787..0e84881bb3ab4c 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/ReactActivityDelegate.java +++ b/ReactAndroid/src/main/java/com/facebook/react/ReactActivityDelegate.java @@ -47,7 +47,7 @@ public ReactActivityDelegate(ReactActivity activity, @Nullable String mainCompon } protected ReactRootView createRootView() { - return mReactDelegate.createRootView(); + return new ReactRootView(getContext()); } /** @@ -73,7 +73,12 @@ protected void onCreate(Bundle savedInstanceState) { String mainComponentName = getMainComponentName(); mReactDelegate = new ReactDelegate( - getPlainActivity(), getReactNativeHost(), mainComponentName, getLaunchOptions()); + getPlainActivity(), getReactNativeHost(), mainComponentName, getLaunchOptions()) { + @Override + protected ReactRootView createRootView() { + return ReactActivityDelegate.this.createRootView(); + } + }; if (mMainComponentName != null) { loadApp(mainComponentName); }