I am trying to setup my development environment for Google Wear and have followed Google's instructions but as soon as I setup the port forwarding (adb -d forward tcp:5601 tcp:5601) I am getting an error on the device;
Connection closed, waiting before trying again
I have the emulator running on the PC and Android device is a Nexus 4, 4.4.4.
If you've updated everything, and have the new emulator, you might need Android Wear (not Android Wear Preview). Follow these steps: http://developer.android.com/preview/google-play-services-wear.html
You may have done this recently, but now that Google Play Services 5.0, and Android Wear is out (unofficially) it's worth trying again to get the latest updates.
OR, you may just need to click that emulator button in the screenshot, to let the app know you're connecting to an emulator.
One issue I found when attempting to do this 2 weeks ago, is that despite the documentation saying to save the image to a snapshot, the emulator will not connect when launched from a snapshot. Launch the emulator and uncheck the box for "launch from snapshot."
Once the emulator is running, run
adb devices
and ensure the watch emulator is showing and has "device" next to it. If it does, then you can run
adb -d forward tcp:5601 tcp:5601
Now try connecting the preview app.
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.
Stuck with the same a while ago. It appeared that Google updated their Android Wear app - the one on the screenshot in the question is out-of-dated version. After installing new version everything worked for me (as long as I used device with android 4.3+ and adb -d forward tcp:5601 tcp:5601 command to connect to wear emulator)
Related
I want to run my code on the phone. But Android does not recognize my device. I also did the connection assistant.
But the following error is given. please guide me.
Needed informations
Is ADB installed with Android Studio, or have you got external tool?
Is there a generic Android USB Device driver installed? It's provided with Android Studio, and should be obtained with SDK Tools.
Possible solution
If even AVD cannot be recognized, it could be fault of built-in ADB server. I would recommend installing ADB as an external program, e.g. from here (ClockworkMod page).
After installation, reboot PC and plug your phone in. If phone is visible, check for availability via adb devices command from CMD/terminal. Don't launch Android Studio yet, as it has its own instance of ADB server and you wouldn't be able to launch second one from console.
If phone is visible, use adb kill-server command to finish the console instance, and launch Android Studio. Everything should be detected, if not - you really should submit that bug...
If phone is not visible all the time after issuing adb devices, there is a chance that not all drivers are installed. Check ASUS for drivers, if they were installed automatically - install them manually.
Hope it will help!
Have a look at PdaNet+
Install both the desktop client and the corresponding android application from the google play store. Once you plug in your device it will prompt you that your device has been connected and adb should recognise it.
I have the opposite of this problem: Android Studio doesn't see device
Android studio sees the device and can deploy to/ run on device no problem.
But I'm trying to use apache cordova and cannot see the device online from the command line.
adb devices
shows my device number, and "offline".
I've tried all of the recommended steps here https://stackoverflow.com/a/9966660/210757
Any suggestions?
whenever i start eclipse or android studio an emulator is constantly running in the background. when i try to turn it off it restarts again immediately. no matter if i work with a real device or an emulator i have created, this other emulator is not stoppable. in the android debug monitor this emulator is listed as emulator-5554 - Online - ? [2,3,4, debug] (Version API10). i never created or used this emulator, and there is no place to find and delete it.
actually i am able to work with eclipse or android studio with that annoying emulator, but it seems to slow down the performance and i would like to get ride of it.
Were you using BlueStacks back then by any chance?
It uses the port 5554, and that might have been your problem too!
It happened to me as well and found the solution in another question:
Eclipse Android Emulator-5554 is always displayed
Strange, but should be able to kill a "hidden" emulator instance from the command-line by connecting to its console, i.e.:
telnet localhost 5554
kill
Replace 5554 with your emulator instance's number.
I use AndroVM. For me its perfect.
Todo is:
install VirtualBox first
download AnroVM
file will open in VirtualBox
start the machine and set USB debug on (settings >> dev. options)
in commandprompt goto your "sdk\platform-tools" type adb connect 192.168.15.101
When it's ok you will see your device in Eclipse.
edit: When your Eclipse is not working well, just download a new bundle again
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.
#Lance Nanek basically helped me solved this problem. In case you had the similar problem, these steps might be helpful.
run 'adb devices' , you should see two devices, one is your
emulator, the other is your device with Android Wear Preview app
installed.
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."
run 'adb devices' again, make sure you do see two
devices online
run command 'adb -d forward tcp:5601 tcp:5601'
from the android wear preview app, tape connect, you should be ready
to go.
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.
Enable adb debugging in the developer options on your watch.
Enable bluetooth debugging in the developer options on your watch.
Enable bluetooth debugging in the wear app on your phone. run in terminal:
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.
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!
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.
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)
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.
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.
Run the adb -d forward tcp:5601 tcp:5601 command in super user mode
I have a simple camera app I'm trying to push to my phone, but HTC sync (Thunderbolt on Verizon) simply will not recognize the device. I believe this is the reason I can't get the phone to accept the APK. All my drivers, project, and sdk manager and plugin are updated and I reinstalled HTC sync just to be sure. I also enabled usb debugging and unknown sources
I believe the Thunderbolt connectivity issues also destabilize the eclipse plugin. I get hung randomly during Android functionality in eclipse (like simply loading DDMS or a Run Configuration).
As a result, I'm trying to find a way to work around having to use HTC sync to push my app there.
I developed with a HTC Desire some weeks ago and it worked without problems.
You shouldn't need HTC sync. Have you tried to use the google usb driver as described here?
Whats the output when you call adb devices from commandline? If everything worked correctly you should see the device id of your phone.
Sometimes the following can help if adb does not recognize your device:
adb kill-server to stop the adb process
Use the task manager to make sure no other adb process is running (stop them with the task manager)
restart adb server by calling adb devices
Try to install the app using adb install -r C:\path\to\app.apk