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

Re-enable development tools for Android #5988

Closed
ide opened this issue Oct 16, 2019 · 1 comment · Fixed by #6105

Comments

@ide
Copy link
Member

@ide ide commented Oct 16, 2019

In this commit b523067 we comment out accessing member variables named DEBUG_SERVER_HOST_PORT and INSPECTOR_PROXY_PORT because they have been replaced by methods. This task is to update android/expoview/src/main/java/host/exp/expoview/Exponent.java to use the new RN 0.61 API when appropriate (and the old API when appropriate).

This is the commented-out code in Exponent.java:

-        Field debugServerHostPortField = fieldObject.rnClass().getDeclaredField("DEBUG_SERVER_HOST_PORT");
-        debugServerHostPortField.setAccessible(true);
-        debugServerHostPortField.set(null, debuggerHostPort);
+        // Field debugServerHostPortField = fieldObject.rnClass().getDeclaredField("DEBUG_SERVER_HOST_PORT");
+        // debugServerHostPortField.setAccessible(true);
+        // debugServerHostPortField.set(null, debuggerHostPort);

One possible fix is to add a setter method to the RN class that we call, instead of trying to override the port with reflection. Not sure what is most robust here.

@ide ide added this to To do in SDK 36 via automation Oct 16, 2019
@ide ide mentioned this issue Oct 16, 2019
10 of 11 tasks complete
@brentvatne

This comment has been minimized.

Copy link
Member

@brentvatne brentvatne commented Oct 16, 2019

related PR upstream facebook/react-native#23616

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
SDK 36
  
Done
3 participants
You can’t perform that action at this time.