android emulator on eclipse won't open - android

I've gotten it to work before but now the android emulator on eclipse refuses to open. No new window, nothing. Most of the time the console says nothing when I tell it to launch, other times it says "The connection to adb is down, and a severe error has occured." but if I try again after waiting a bit it goes away then it says Launching.... and does nothing.
I try to delete the avds and it says they are currently running in emulators and cannot be deleted even though there are no windows open. I tried re-installing the (1.6) SDK and that didn't work.
Oh and I'm using Ubuntu
Edit The console is finally working, after complaining about adb, I ran it again and I got
"Launching a new emulator with Virtual Device "XXX" and then nothing
then I tried to launch a different project with the same emulator and got:
Automatic Target Mode: Preferred AVD "XXX" is not available. Launching new emulator.
Launching a new emulator with Virtual Device "XXX"

Run adb kill-server and then sudo adb start-server and then adb devices and see if you see the emulator. Sometimes the emulator is running but it hides somewhere. Also trying running the app in debug mode. Also the emulator can be just damn slow sometimes. adb is a command located in the sdk tools directory I think. Add it to your path and it will save you a lot of time. You can also do install and uninstall of your apps using command. Then tell us what you see.

I did have the same issue and I solved it by running the emulator from the command line. Go to the tools folder in the SDK package and start the emulator from there, use the name of the emulator you setup in Eclipse (in Virtual Device Manager):
./emulator -avd [the name]
The GUI should either come up (the GUI comes up fairly quick but will "idle" quite a bit) or you'll probably get an error on the command line. For me it was a missing library, namely libGL.so. Install a lib with apt-get containing libGL and retry.
sudo apt-get install libgl1-mesa-dev:i386
./emulator -avd [the name]
I did some googling and I'm not the only one, and of course those libs are missing in a 64 bit environment. Here's another one with the same problem.
Hope it helps!

Related

Error when launching .apk on android studio emulator

I am building an app with ai2 but I have spend hours trying to get their emulator to work, so I have exported myapp.apk and I am trying to launch it on android studio emulator.
I have followed several tuto included the answer proposed by Tarek on that thread But I am getting and error on cmd.
Here is what I tried:
run android studio as administrator, run the emulator via the AVD manager, waited until it's started.
move myapp.apk in the sdk/platform-tools folder
created a run.bat file in this folder and wrote CMD in it5. copy your desired apk to the same folder
double click on run.bat and wrote: adb install r- "myapp.apk"
Here I am getting an error on CMD: error device not found -waiting for device-. I don't understand because my emulator is running.
I have also tried to launch the emulator without starting android studio with this command emulator -avd <avd_name> [<options>] but I get this message "the system cannot find the file specified".
The error message appears because adb cannot connect to the device although it is running. This is not supposed to happen, but it does from time to time.
You can always check if adb can see the emulator by running adb devices, which should result in a list of devices it can see. If this list is empty, the device is not found. You can resolve this by adb kill-server, waiting a couple of seconds and then running adb start-server. Try running adb devices again, and the device should be listed, and the installation should succeed.
Starting an emulator can be done by running emulator #<device-name> [options]. The device name can be found by running android list avd. This will result in a list of devices of which the <device-name> will also be listed.

Eclipse ADB error [Ubuntu 13.04]

So I'm running Ubuntu 13.04 and for the past many hours I've been trying to get eclipse (Eclipse Juno 4.2.2) to launch anything on my phone, or even just in the emulator, but to no success. Whenever I try to launch the app, I'm greeted with an adb not found error (/home/kiyoshi/Desktop/Development/Android/sdk/platform-tools/adb not found), even though I have checked multiple times to make sure a file named adb is there.
I have also installed adb via command line so using commands such as 'adb devices' works fine, and I really have no idea what I'm doing wrong, even after looking through pages of other questions with similar problems.
This screenshot shows the error when I try to launch anything
Any help is appreciated,
thanks!
The error message clearly states something different: "libncurses.so not found". So you probably missed to install the needed 32-bit stuff:
sudo apt-get install ia32-libs
Make sure your device is in USB debugging mode. Then, restart the adb server by the console, going through is path and typing:
adb kill-server
then
adb start-server
Restart Eclipse and usb connection (unplug, plug)
hope it helps, it Always helps me

Eclipse Android Virtual Device Manager doesn't launch

I am using Eclipse 4.2.1 (Juno).
My Android Virtual Device Manager does not launch. I press on the button and literally nothing happens (no error message).
I've tried reinstalling the Android SDK, ADT and Eclipse but nothing helps to fix this issue.
Any ideas on how to fix this issue?
I ran into the same problem when relocating my entire developement directory. Deleting the folder and relaunching Eclipse resolved it.
Had the same problem. After several reinstalls, restarts and what not, I finally figured it out:
open cmd, run android avd from sdk\tools folder. You'll probably get an exception that you can google, which is already better than no response at all...
This is what I got:
java.lang.NullPointerException
at com.android.sdklib.internal.avd.AvdInfo.getDeviceName(AvdInfo.java:158)
What did the trick for me was deleting the folder C:\Users\<User>\.android\avd.
In this case reinstalling will help
get the android development package from developers site.....
and you can try by running in a new User Account in your PC
some times it workss!!!
all the best!
Close Eclipse
Kill adb through command line with command adb kill-server
Now start task manager and kill adb process also from there if running from the process tab
Now start your adb again from command line with adb start-server
-Now start your Eclipse again and run your application
Try!!
In my case this was a problem with old /tmp/android-username/emulator-* files.
I found it out by running manually my predefined arm AVD named "Test"
$ cd adt-bundle-linux-x86_64-20130522/sdk/tools
$ ./emulator64-arm -avd Test
NAND: could not write file /tmp/android-username/emulator-gKbQ19, File exists
Removing old emulator files from /tmp/android-username resolved the problem.
rm /tmp/android-username/emulator-*

android problems sending app to emulator from using terminal

I have launched an emulator with a:
android avd
(although the android developers site said do it from platform-tools, i did it from tools because the android command was there ,and not in platform-tools). Anyway the AVD manager appeared and I started one, and it launched just fine.
Then I tried to send my app to the emulator so (following the android developers instructions) I do a:
adb install /newApp.apk
the command prompt jumps to the next line and just blinks.....when i check the emulator nothing has changed...where am i going wrong???
Once you have started the emulator try
adb devices
to check if you can see it
List of devices attached
emulator-5554 device
then you can proceed with the install
adb install <path-to>/newApp.apk
Something looks strange about that path. If the apk is in the same directory you are launching the command from then you don't need that '/'. If this is a linux machine it would be './' for the same directory unless your apk is all the way up on root but that would be bad :)

error "The connection to adb is down" when run an android app

I'm new with android development, and I have problems installing all the recent platform. I'm a java developer that I would like learning android.
I've installed all programs succesfully in windows xp sp3 (JDK 1.6 with environment vars created, eclipse 3.5, 3.6 & 3.7 well configured, Android SDK with all the features, devices, platform-tools, APi's, etc, and ADT Plugin 12 for eclipse with an emulator to API 8 -Target 2.2-), but, when I'm running an android project into eclipse (Run -> Android Application), the eclipse console show me: "The connection to adb is down, and a severe error has ocurred... You must restart adb and eclipse... Ensure that adb is in this path 'D:\Android\android-sdk-windows\platform-tools\adb.exe'" (or something similiar).
I'm very sure that the path is right, adb is correctly running on command-line, and the commands 'adb kill-server' and 'adb start-server' works fine, but doesn't solve my problem (like I've read in other answers).
The emulator, via Eclipse, not working, but if I start the emulator via Eclipse ADV Manager, emulator starts fine, but when I runs the android app, I take the same error.
I suppose that Eclipse can't start adb,but I don't know why.
Other issue, when I executed 'adb devices', console show me an empty list, no 'no devices' message, but when I plugged my HTC, adb is running fine in console, but Eclipse doesn't.
In addition, I also try restarting adb with Eclipse - Devices tab, but the list of devices are empty too.
Anyone can help me, please? I've read so much that my eyes are pixelated. xD
Best regards!!
PD: sorry, but my english is a bit poor ;)
in the DDMS perspective (if it doesn't show, add it by click window>open perspective>other...>DDMS)
then click the triangle of the devices tab > reset adb.
this works for me.
I finally resolved the problem, please see my blog
you can do this steps to solve the problem:
task manager-> process
right click on adb.exe and left click on "properties"
check the path of the process:
-if the path is like "Programs\android-sdk\platform-tools", which means it is the android sdk that is running this process.
-if not, that means there is another process this is running adb.exe, you have to kill the process or service which runs adb.exe.(you can identify the process by the path)
I've had this problem too. The solution I've found is to kill eclipse, open up task manager and kill the adb.exe process. Then when you start eclipse again, that should also kick start adb and it should work from there.
Try the following steps :
- Close Eclipse IDE
- Go to the Android SDK platform-tools directory in Command Prompt
- run adb kill-server
- run adb start-server
- Now start Eclipse again.
Hope this may help you :)
In my case, in Windows7
Close all opened emulators
Go to task manager > processes and then click on adb.exe and press the button 'end process'.
Then go to command prompt go to plate-form tools and type
adb start-server
Then run your application through eclipse.
It worked fine for me.
you try
Open Task Manager > Processes > eclipse.exe > End Process > restart eclipse
In my case the problem was the FIREWALL!.Turn off your windows firewall , Then restart adb and eclipse from task-manager

Categories

Resources