Android wearable emulator can't connect with usb connected phone

做~自己de王妃 提交于 2020-01-04 09:19:28

问题


I'm trying to develop an android wearable application but I don't have wearable device. So I'm using an Android wearable emulator. I tried to connect with wearable emulator and phone. Phone connected with usb cable. My phone API version is 19. Wearable emulator version 20. I installed Android Wear application in my phone. I tried to connect emulator and device by ADB command. I'm not sure bluetooth need to open in mobile device because i think usb cable can connect to wearable emulator.

Check The Device List

adb devices

Results

C:\Program Files (x86)\Android\android-studio\sdk\platform-tools>adb devices
List of devices attached
HT365W906209 device
emulator-5554 device

AVD communication port to phone

adb -d forward tcp:5601 tcp:5601

Results

C:\Program Files (x86)\Android\android-studio\sdk\platform-tools>adb -d forward tcp:5601 tcp:5601 C:\Program Files (x86)\Android\android-studio\sdk\platform-tools>

After executing the above command, I can't connect with my device and emulator. I followed this tutorial.

This is android wear application in my phone.


回答1:


You, and the tutorial as well, haven't mentioned that you explicity selected Pair with emulator right inside the Android Wear Companion app. So please give this a try:

Step 1 - Select "Pair with a new wearable"

Step 2 - Select "Pair with emulator"

Afterwards the ActionBar should say "Emulator - Connecting...". Execute the adb forward comand once again and it should work.



来源:https://stackoverflow.com/questions/25656619/android-wearable-emulator-cant-connect-with-usb-connected-phone

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!