I had almost the same problem you currently have a few days ago. For me it was a real device.
From all my research, the solution that worked for me is the following :
When you launch your app by typing react-native run-android
, the error appears.
So, reach your directory containing "adb.exe" ( for me it was C:UsersusernameAppDataLocalAndroidSdkplatform-tools )
open a terminal from here. And type adb reverse tcp:8081 tcp:8081
Then, by reloading the app on the phone, it should work.
I hope this will help you !! ( if not, shame on me )
Cheers ;)
EDIT :
I've find a more convenient solution to solve this problem.
When you launch your "react-native run-android" you might have a comment saying "adb is not recognized as internal or external command..."
Well, instead of manually using the adb command, you can add an environment variable leading to the adb.exe.
Just get to the "Control Panel" > "System and Security" > "System" > "Advanced System Settings".
From here, click on "Environment Variables". Search for the "Path" variable in the "System Variables" section. Click on it and press the "Edit" button.
There you can add a new path to this variable. Just click the "New" button and write the adb.exe path. For exemple C:UsersusernameAppDataLocalAndroidSdkplatform-tools
(For the oldest versions of Windows, you'll have to add ";C:UsersusernameAppDataLocalAndroidSdkplatform-tools" to the content.)
This is it, now the adb reverse tcp:8081 tcp:8081
command will be ran automatically upon building.
Hope this will even more helps you !
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…