Here I have an application, which is supposed to be run on 4.0.3 AVD (as selected in properties).
But as soon as I run the app, it automatically starts in 2.2 AVD.
So, I've change the run option from "Run configurations", and set it to Always prompt to pick up device.
Now I have both 2.2 and 4.0.3 AVD running:
But as soon as I run the app, eclipse gives the list of online devices I have, and there is only 1 device (2.2) online:
How can I make my app run on 4.0.3 AVD?
Generally this problem is solved by two simple commands, I recommend you to run these two commands from your DOS prompt(In windows) or shell (in case of Linux)
adb kill-server
adb start-server
Related
I am trying to run an application developed in Android Gingerbread (API 10) emulator in Android Studio 2.3.2.
When running, it shows the message,"waiting for target device to come online" and it stays on that even after the emulator has come online, and does not go beyond that point.
I tried to:
1. Update libraries
2. Restart the PC
3. Stop the emulator from AVD
However the application runs successfully on my mobile with Android Naught 7.1.1, but I want to test the app in Gingerbread environment which on the emulator I am not able to do.
I am not able to understand where exactly do I need to check for such error.
I had this problem too when using Gingerbread armeabi and armeabi-v7a images. Nothing helped. I fixed it by using x86 image.
If you don't see device in $ adb devices, try to run:
$ adb kill-server
$ adb start-server
I am starting my first android project using nativescript.
I want to run my project with genymotion.
In genymotion GUI settings/ADB I am using custom Android SDK tools and genymotion tells me the android SDK tools are found. Also the VirtualBox path is valid, and when I renamed the device the VirtualBox name and Genymotion name both changed. The Virtualbox VM is powered down.
I start genymotion and get the emulator open with a black screen. I then run:
tns run android
per the nativescript docs
I get as output:
Cannot find connected devices. Reconnect any connected devices, verify that your system recognizes them, and run this command again.
I then tried running:
adb devices
and got an empty list so it seems my device is not being recognized, I just don't know why.
I have also tried running:
tns run android --emulator --geny nameOfDevice
This starts the emulator but again just a blank screen. So I guess nativescript knows about the device but adb doesnt?
Any help would be greatly appreciated and apologies in advance if I am missing some obvious android issue.
You should also make sure that your GenyMotion is using the right SDK.
Go to: >> Settings >> ADB
And choose Use custom Android SDK Tools
If the SDk path is found it will be marked with
Android SDK Tools successfully found!
Do not open genymotion before adb initialisation.
Start adb server first
by adb start-server
and then open genymotion to initialise emulator.
After that you should be able to see emulator in list of running devices through adb command. I ran into the same scenario where adb does not list emulators if genymotion is opened before adb initialisation. I hope it helps.
My working solution is:
cd /opt/genymobile/genymotion/tools
./adb devices
You have to use its own adb tool.
I noticed that Android Studio (and adb) sometimes show that I have one or more Android emulators running although I didn't start any of them:
$ adb devices
List of devices attached
emulator-5670 host
emulator-5640 host
It becomes somewhat inconvenient when I use adb on the command line and must specify the device each time with -d because it says that multiple devices are running.
Why are they starting (what is triggering this)? Can it be disabled?
Android Studio version: 1.5.1 (on Windows 10)
This is an emulator bug,
try to restart the ADB process
https://groups.google.com/forum/#!msg/adt-dev/4Qbchil3Tcw/VnRhfh-zAgAJ
Eclipse is in another hard drive (e:). While avd are in c:/Users/Myname/Android.
Problem is that when I run as android application, nothing happens, though the emulator is running. The app is working on the physical phone. I've read several answers, all vague. Help?
I suspect the Android Debug Bridge (adb) isn't running or isn't correctly running. Try running
adb devices
If your emulator is not listed, try running
adb kill-server
adb devices
Note that adb is installed in the platform-tools subdirectory within your android sdk installation.
When I try to Run (or Debug) my project in eclipse, the AVD emulator emulator boots normally but eclipse doesn't recognise it. On DDMS, the Devices tab does not find the AVD emulator and thus I see no traffic in the LogCat.
On the other hand, when I plug my phone and choose Run (or Debug) project, eclipse connects to the phone and works just fine (I see it on DDMS on LogCat shows traffic). Any thoughts on this one?
I'm using Eclipse_Galileo_5.2 and Google APIs (API level 12, Platform 3.1). I was working with the same setup before the problem appeared without any problems.
I highly appreciate all the help...
Simply run from command line adb kill-server and then adb start-server. ADB will reattach to the running emulator and will be able to work with it. Do not exit the emulator as bashu suggests as the problem is likely to appear again if you have a slower computer.
Lots of time it happens to me also.
What i do is, I first Exit the Emulator. Then kill adb using
adb kill-server after that i clean the project.
and then adb start-server
and finally run the application and it works fine for me.
Thanks.