Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[android] react-native 0.57 compatibility #3831

Closed
birkir opened this issue Aug 22, 2018 · 6 comments
Closed

[android] react-native 0.57 compatibility #3831

birkir opened this issue Aug 22, 2018 · 6 comments

Comments

@birkir
Copy link
Contributor

birkir commented Aug 22, 2018

facebook/react-native@506f920

UIImplementationProvider has been removed so I had to do the following to get Android to work in React Native 57.

--- a/node_modules/react-native-navigation/lib/android/app/src/main/java/com/reactnativenavigation/react/NavigationReactNativeHost.java
+++ b/node_modules/react-native-navigation/lib/android/app/src/main/java/com/reactnativenavigation/react/NavigationReactNativeHost.java
@@ -83,7 +83,7 @@ public class NavigationReactNativeHost extends ReactNativeHost implements Bundle
                 .setUseDeveloperSupport(getUseDeveloperSupport())
                 .setRedBoxHandler(getRedBoxHandler())
                 .setJavaScriptExecutorFactory(getJavaScriptExecutorFactory())
-                .setUIImplementationProvider(getUIImplementationProvider())
+                // .setUIImplementationProvider(getUIImplementationProvider())
                 .setInitialLifecycleState(LifecycleState.BEFORE_CREATE)
                 .setDevBundleDownloadListener(getDevBundleDownloadListener());
 
--- a/node_modules/react-native-navigation/lib/android/app/src/reactNative56/java/com/reactnativenavigation/react/SyncUiImplementation.java
+++ b/node_modules/react-native-navigation/lib/android/app/src/reactNative56/java/com/reactnativenavigation/react/SyncUiImplementation.java
@@ -7,7 +7,7 @@ import com.facebook.react.bridge.ReadableArray;
 import com.facebook.react.bridge.ReadableMap;
 import com.facebook.react.uimanager.ThemedReactContext;
 import com.facebook.react.uimanager.UIImplementation;
-import com.facebook.react.uimanager.UIImplementationProvider;
+// import com.facebook.react.uimanager.UIImplementationProvider;
 import com.facebook.react.uimanager.UIManagerModule;
 import com.facebook.react.uimanager.ViewManager;
 import com.facebook.react.uimanager.common.MeasureSpecProvider;
@@ -20,17 +20,17 @@ import java.util.List;
 public class SyncUiImplementation extends UIImplementation {
     private static final Object lock = new Object();
 
-    public static class Provider extends UIImplementationProvider {
-        @Override
-        public UIImplementation createUIImplementation(ReactApplicationContext reactContext, List<ViewManager> viewManagerList, EventDispatcher eventDispatcher, int minTimeLeftInFrameForNonBatchedOperationMs) {
-            return new SyncUiImplementation(reactContext, viewManagerList, eventDispatcher, minTimeLeftInFrameForNonBatchedOperationMs);
-        }
+    // public static class Provider extends UIImplementationProvider {
+    //     @Override
+    //     public UIImplementation createUIImplementation(ReactApplicationContext reactContext, List<ViewManager> viewManagerList, EventDispatcher eventDispatcher, int minTimeLeftInFrameForNonBatchedOperationMs) {
+    //         return new SyncUiImplementation(reactContext, viewManagerList, eventDispatcher, minTimeLeftInFrameForNonBatchedOperationMs);
+    //     }
 
-        @Override
-        public UIImplementation createUIImplementation(ReactApplicationContext reactContext, UIManagerModule.ViewManagerResolver viewManagerResolver, EventDispatcher eventDispatcher, int minTimeLeftInFrameForNonBatchedOperationMs) {
-            return new SyncUiImplementation(reactContext, viewManagerResolver, eventDispatcher, minTimeLeftInFrameForNonBatchedOperationMs);
-        }
-    }
+    //     @Override
+    //     public UIImplementation createUIImplementation(ReactApplicationContext reactContext, UIManagerModule.ViewManagerResolver viewManagerResolver, EventDispatcher eventDispatcher, int minTimeLeftInFrameForNonBatchedOperationMs) {
+    //         return new SyncUiImplementation(reactContext, viewManagerResolver, eventDispatcher, minTimeLeftInFrameForNonBatchedOperationMs);
+    //     }
+    // }
 
     public SyncUiImplementation(ReactApplicationContext reactContext, List<ViewManager> viewManagerList, EventDispatcher eventDispatcher, int minTimeLeftInFrameForNonBatchedOperationMs) {
         super(reactContext, viewManagerList, eventDispatcher, minTimeLeftInFrameForNonBatchedOperationMs);
@johakr
Copy link
Contributor

johakr commented Aug 23, 2018

This is also a issue in v1 of react-native-navigation. Created a PR here #3836.

@bunnyc1986
Copy link

what is UIImplementationProvider for? can it be commented out?

LordParsley added a commit to LordParsley/react-native-navigation that referenced this issue Sep 16, 2018
@starzle
Copy link

starzle commented Sep 18, 2018

Since 0.57 is now officially out, is it possible to add support to it?

@LRNZ09
Copy link

LRNZ09 commented Oct 3, 2018

Related issue here, there's also a pending pull request.

@guyca
Copy link
Collaborator

guyca commented Oct 18, 2018

Just a quick update,
RNN compiles and run with RN 0.57. If you're using rect components in TopBar, i suggest you refrain from upgrading to RN 0.57 until facebook/react-native@506f920 is reverted, which should happen in RN 0.58.
I'm closing the issue as there's no more work needed from us.

@guyca guyca closed this as completed Oct 18, 2018
@guyca
Copy link
Collaborator

guyca commented Nov 17, 2018

RN 0.57.5 includes UiImplementationProvider and supports RNN

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants