Android Wear Emulator: How to debug on Emulator?

泄露秘密 提交于 2019-12-11 05:55:14

问题


I have a simple application where in I am sending some message to Wear and receiving some from wear. Now how do I test this when I just have a real handheld device with a emulator? Whatever I do, the emulator does not connect to the device. In the Android Wear app on my mobile, it always says Target: disconnected.

I have tried all permutations and combinations of following commands: adb forward tcp:4444 localabstract:/adb-hub; adb connect localhost:4444 adb -d forward tcp:5601 tcp:5601


回答1:


I usually run ddms from the Android SDK tools directory. It should attach to the emulator.




回答2:


adb -s 225bac78 -d forward tcp:5601 tcp:5601

replace 225bac78 with your handheld device name from adb devices



来源:https://stackoverflow.com/questions/30236254/android-wear-emulator-how-to-debug-on-emulator

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