Not able to connect Android Wear Emulator with Dev

2020-01-30 06:43发布

问题:

I am not able to connect Android Wear Emulator with my device.I have HTC One device which has 4.4 (KitKat OS).

I follow below link :

Setting up Android Wear

But, when I execute the line adb -d forward tcp:5601 tcp:5601 through command prompt,nothing happens.Android Wear emulator does not show device connected.

Note : I am able to launch the Android Wear Preview app successfully in my device and Notifications settings is also enabled.

Any help will be appreciated.

回答1:

@Lance Nanek basically helped me solved this problem. In case you had the similar problem, these steps might be helpful.

  1. run 'adb devices' , you should see two devices, one is your emulator, the other is your device with Android Wear Preview app installed.

  2. you might see your emulator offline, if so, kill the emulator. From avd, start it, carefully uncheck 'launch from snapshot' - this is contrast to Android Wear Get started instruction: "Start the AVD again, but select Launch from snapshot and deselect Save to snapshot."

  3. run 'adb devices' again, make sure you do see two devices online
  4. run command 'adb -d forward tcp:5601 tcp:5601'
  5. from the android wear preview app, tape connect, you should be ready to go.


回答2:

On the newly updated Android Wear app (Aug 2014) there is a settings button top right when asked to choose a device connected via bluetooth. Pressing this button will connect to an emulator instead.



回答3:

  1. Enable adb debugging in the developer options on your watch.
  2. Enable bluetooth debugging in the developer options on your watch.
  3. Enable bluetooth debugging in the wear app on your phone. run in terminal:
  4. adb forward tcp:4444 localabstract:/adb-hub; adb connect localhost:4444

See this training.

I think I also had luck with using the cradle plugged directly into the computer, but unable to confirm that now.



回答4:

Android Wear using Genymotion For people who does not have a phone with Android 4.3 or above, we can not try the Android Wear Preview. :'( And here is a way you can try, use Genymotion Nexus 4 or any other emulator with Android 4.3 or Android 4.4 and it works!

Setup a Nexus 4 with Android 4.3 in Genymotion. Start both the Nexus 4 and Android Wear emulator. You should first install Google Play Services on the Nexus 4: Download the zip file Drag it into the Nexus 4 Reboot the device, and now you are able to install "Android Wear Preview" on Play Store Open Terminal, use adb tools: adb devices you shoud see 2 devices, adb -s [device name of Nexus 4] forward tcp:5601 tcp:5601 Done!



回答5:

The trouble I was having, was that the pre-selected API level was set incorrectly. It should be set to the following values:

Using Host GPU is optional.



回答6:

Stuck with the same a while ago. It appeared that Google updated their Android Wear app. After installing the new version I was able to connect successfully to wear through its interface (as long as I used device with android 4.3+ and adb -d forward tcp:5601 tcp:5601 command)



回答7:

After some hours trying to find the solution... I've found it!

In my case, the problem was that I have two different SDKs (one from Eclipse and the other from Android Studio), so I was trying to execute the ADB commands in the wrong one.

So it is important that you check the path you are using in your IDE and execute the commands on the same.



回答8:

I was getting suck on "Connecting to Emulator", but I fixed it by using an Android Wear ARM virtual device instead of an x86 one.



回答9:

Run the adb -d forward tcp:5601 tcp:5601 command in super user mode