React-devtools: Can i use with Android device?

Created on 11 May 2017  ·  12Comments  ·  Source: facebook/react-devtools

I ran npm install -g react-devtools and react-devtools as stated in https://github.com/facebook/react-devtools/tree/master/packages/react-devtools.
Which says "it should connect to your simulator within a few seconds." It works with simulator however I am trying to use a Samsung S4 and nothing shows up besides the Waiting for React to connect… screen. Are the dev-tools compatible with a real device or only a simulator?

"react": "16.0.0-alpha.6",
"react-native": "0.44.0",
Mac OSX Sierra,
Android 5.0.1

Most helpful comment

I was having this issue, but i got fixed.

used adb reverse tcp:8097 tcp:8097 and on the app -> dev menu -> dev settings -> Debug Server host... put my machine ip

All 12 comments

@laclance for real device, I use stand-alone app https://github.com/jhen0409/react-native-debugger

Same here (cannot connect to the android device)

I was using the stand-alone app. I reinstalled everything twice and upgraded all packages to latest versions and everything is working now.

@laclance can you please explain how did you solve your problem?

Are you using this repo or react-native-debugger?

same problem here. yes laclance you could be more specific

sorry for the late reply i could not get this repo or react-native-debugger to work. At first i removed and reinstalled everything and it worked for a few days then it started only working once and saying unable to connect to remote debugger almost everytime i reloaded. I have not had the time to try and find the issue.

adb reverse tcp:8097 tcp:8097 works but it disconnects more than it connects : (

adb reverse tcp:8097 tcp:8097 connect that. but disconnect from device. :(

I was having this issue, but i got fixed.

used adb reverse tcp:8097 tcp:8097 and on the app -> dev menu -> dev settings -> Debug Server host... put my machine ip

Maybe someone will find it usefull: comment

@WeslleyNasRocha Holy cow, that was it!

Not sure is possible in my device to got from the app in order to:

" the app -> dev menu -> dev settings -> Debug Server "

Maybe I did not got it. I instead followed the official documentation that should map the device app to the local dev machine and it actually worked.

https://facebook.github.io/react-native/docs/running-on-device.html#method-1-using-adb-reverse-recommended

Not sure if at least once connected the device need to be shaked but there is an alternative also for this. See @pie6k answer

https://stackoverflow.com/questions/37839666/how-do-i-open-react-natives-dev-menu-on-real-device

Was this page helpful?
0 / 5 - 0 ratings