Uber goal: debug/deploy react-native android application on Windows machine
Problem: When deploying to the emulator react-native run-android
fails with > com.android.builder.testing.api.DeviceException: No connected devices!
. I tried running adb devices
, but that returned no devices. My assumption is that to get this working I need to at least make adb aware of the emulator, and so here I am.
Versions
Windows 10
Version 1703 (OS Build 15063.540)
abd
Android Debug Bridge version 1.0.39
Revision 3db08f2c6889-android
Visual Studio Emulator for Android 1.1.622.2
Android OS hosted by emulator KitKat (4.4)
API Level 19
Emulated Device 5" screen
XXDPI Phone
"Similar to Samsung Galaxy S5, Sony"
Setup
- Android OS:
- Enabled developer mode
- Turned on USB Debugging
- VM:
- 2 GBs memory
- 2 virtual processors
- 1 Windows Phone Emulator External Virtual Switch
- 1 Windows Phone Emulator Internal Virtual Switch
Result
adb devices
returns that it can't find devices followed by two blank lines:
List of devices attached
<blank line>
<blank line>
What has already been tried/verified
- Verified emulator boots
- Verified emulator has a network connection and IP address (I can reach internet from emulated android)
- Verified I can ping said IP address from the host Win 10 machine
- Verified I can find (via
adb devices
) and deploy (viareact-native run-android
) to real device attached by USB - Tried forcing adb connection with
adb connect 192.168.0.2:5555
andadb connect 192.168.0.2:5554
and received following error:unable to connect to 192.168.0.2:5555: cannot connect to 192.168.0.2:5555: No connection could be made because the target machine actively refused it. (10061)
- Couldn't find remedy for this online
Request for Help
If anyone knows what might be going on and can provide some guidance to resolve, I'd greatly appreciate it. If you need any additional information just ask, and I'll provide it (helpful hints on how to gather it, if non-obvious, would also be appreciated).
Thanks so much for reading this far :)