Unable to connect with remote debugger

后端 未结 14 1298
予麋鹿
予麋鹿 2020-11-28 18:29

I\'m using React.JS and when I do react-native run-android (with my device plugged in) I see a blank page. When I shake the device and select Debug JS Rem

14条回答
  •  半阙折子戏
    2020-11-28 19:09

    In my case, selecting Debug JS Remotely launched Chrome, but did not connect with the android device. Normally, the new Chrome tab/window would have the debugging URL pre-populated in the address bar, but in this case the address bar was blank. After the timeout period, the "Unable to connect with remote debugger" error message was displayed. I fixed this with the following procedure:

    • Run adb reverse tcp:8081 tcp:8081
    • Paste http://localhost:8081/debugger-ui into the address field of my Chrome browser. You should see the normal debugging screen but your app will still not be connected.

    That should fix the problem. If not, you may need to take the following additional steps:

    • Close and uninstall the app from your Android device
    • Reinstall the app with react-native run-android
    • Enable remote debugging on your app.
    • Your app should now be connected to the debugger.

提交回复
热议问题