Android emulator won't boot - android

When trying to run an android emulator (either from eclipse or the cmd line) it simply starts an empty black box with the title 0: (obviously replacing with the name of the avd!). It never boots - doesn't even get to the boot animation.
Logcat shows absolutely no output and devices shows it as emulator:5554 - offline
This happens regardlessof which avd I start - and they had all previously worked.
I'm running all this on linux.
Edit: interestingly it also now fails to recognise an actual phone plugged in with debugging enabled... Android dev is now effectively impossible on this machine until I fix this...
Edit #2: If I create a new emulator and/or edit an existing one (even if I don't actually change anything) enables it to boot. This obviously enables me to move forward, but there is clearly still a problem with adb (actual devices still won't connect) which I still need to fix.
Edit #3: Scratch that last edit - it seemed to work briefly, but not anymore...

The emulator is a horribly slow piece of junk. Startup times of ten minutes or more are not unheard of. You are better off connecting an actual Android device via USB. If you insist on using the emulator, keep it running between debugging sessions to preserve its state (and your sanity).

Do adb reset in eclipse ddms devices view
and go to adb try this
adb shell stop
adb shell start

Ran into this problem in Eclipse--was getting errors in my XML files--as a result my R variable was unable to resolve. When the new Android Application project is created, another appcompat_v7 project is also created. These two projects are associated. The problem cropped up when I kept my main project open, but closed my appcompat_v7 project. When both were open at the same time, the problem disappeared.
Simple, but there it is.

Related

Could not open Selected VM debug port (8700). Make sure you do not have another instance of DDMS or of the eclipse plugin running

I'm trying to execute an android program in eclipse kepler. However, every time I execute I get this message. I did what everyone said about this problem like:
- Making sure there is a line on windows Host file that contain this line: 127.0.0.1 localhost
- Going to Window -> Preferences -> Android -> DDMS and:
1. Setting local debugger port to 8601
2. Check the box Use ADBHOST and the value should be 127.0.0.1
However, none of these things fixed my problem.
Note: I'm using windows 8.1.
two instance of adb.exe are started.
Solve it by Open Task manager by pressing Ctrl+Shift +DEl
and ending the process "adb.exe"
I am currently having this issue too.
My problems arose from the fact that I am trying to run Eclipse and IntelliJ IDEA at the same time. this is because at the moment the logcat view in eclipse appears to be showing me more information, especially when my apps are failing.
I realised that even if you change the "DDMS port" to say 10600, javaw will always be running on port 8700.
Also,when i start IDEA alone, even if its DDMSis on port 8600, i have idea.exe running on port 8700.
So, i feel, this javaw is the one responsible for allowing our debuggers to run. havent solved further though, but for my case, when i start eclipse alone, or first before starting IDEA, everything works perfectly.

emulator doesn't show in device view in ddms

When I try to debug using one of the configurations that I've set up (for example Android233), the emulator never actually launches. I just see a little green icon in my task bar that says "launching Android233," but it never launches. I've let it sit there for hours and it never does anything. I don't know if this is related, but my emulators don't show in device view in the DDMS perspective. I have a physical Android device, which shows up in device view. My question is, what is happenin' and how can I fix it?
Thanks for taking the time to read my question :)
I thought I had the problem figured out, but it stopped working again. Here's more information: When I run my debug configuration, in the lower right corner of my Ecplipse windows it says:
"Launching MyDebugConfig (100%)" and then there's a green icon next to it.
I looked in task manager and the emulator is not in there. I looked in DDMS and my AVD is not listed and there is nothing in the LogCat or Thread or anything else for that matter. I have my debug configuration set to prompt me to pick a device, but it never does that. It just loads my AVD, even if I have my phone connected (which is visible in DDMS). I'm so stumped. I've had this problem since I started using Eclipse and I don't know what to do.
Thanks.
Go to DDMS Perspective =>Click View menu=>reset adb
If Your genymotion virtual device is not seen in android device monitor then just try this.
1. start android studio
2. start Android Device Monitor
3. Lastly start the genymotion virtual device it will appear
The emulator won't show up in the DDMS section until its running.
The emulator won't lunch probably because you misconfigured it, currently the lunch dialog of the emulator doesn't support error messages, however you can get the lunch stack trace while you try to lunch the emulator via Eclipse.
Disconnect your physical device, run your project and select the emulator. you should see an error message on DDMS console.
If you in Windows try run (after starting emulator)
adb.exe kill-server
adb.exe start-server
and wait for restarting your adb

MonoDroid - Target Device does not display in IDE

I'm trying to run the very simplest app on MonoDroid though the MonoDevelop IDE - i.e. the one that is created as part of the new project (the one that increments the lable on button clicks - i won't post code as I don't think it is relevant unless someone really wants it).
When I press the run menu item then run (or debug) i get the emulator selection
I dutifully start the emulator - (I've tried API_7, API_10, API_12) and that works OK. But the IDE above never refreshes to show the currently running emulator so I can't launch the application. I have manually refreshed but the same list comes up. What I am expecting is the new emulator to appear in the list and the OK button becoming active.
I have tried running adb devices in the command line and I can see that the debug bridge has picked up the device i.e. it says emulator-5554 which matches the TCP/IP port that the emulator is running on.
I've also tried restarting the debug server i.e.
adb kill-server
adb restart-server
But I can't see the emulator appear on the above dialog. The debug server is running on port 5037. Could the IDE be listening to a different port?
Fundamentally I'm trying to get the simplest app running through MonoDevelop. And I'm failing. Please help good people.
I had the same problem initially when I tried running the emulators. My recommendations from my own experience would be to:
Run the Android SDK manager and retrieve all the latest SDK packages.
Create your own Android Virtual Device via the AVD Manager rather than running those that are listed when the IDE is intially run. You should then start the AVD manually via the AVD manager and ensure it is fully loaded before starting the de-bug.

Android ADT Debugging Hangs Attempting to connect to debugger on port 8601?

The app runs fine, but it hangs when attempting to connect the debugger, using Eclipse ADT plugin. Sometime shutting down the device will allow debugging to run again. What are the possible reasons for this. I have breakpoints in every create on every activity. What could be the problem? What is it really waiting for?
I had the same problem, only I hadn't realized some eclipse processes were still running since there were no more eclipse windows open.... Check for eclipse.exe as well as javax.exe.
Well it looks like this might have been related to having more than once instance of eclipse running. I separate instance running for separate workspace. Closing on instance appears to have fixed it in this case. might also need to set android:debuggable="true" in application element of manifest.
Sometimes you just have to reboot your Android device.
I have frequent issues with Eclipse, too.
Order I reset:
Disconnect USB, reconnect.
On Android Device, disconnect USB Debugging, reconnect.
Restart adb - In Eclipse go to DDMS screen, select the down arrow next to the camera and select 'reset adb'
Reboot Android Device (for constant problem with debug connecting)
Reboot PC (generally doesn't help)
Do not select any video source (your webcam), just let it empty when the application ask you to select one of them.
This happened to me when i attempted to debug a unit test by starting it from the junit view (right click -> debug as...) which failed and displayed the error message "Test launch failed due to internal error: Running tests on UI thread".
This was due to this bug http://code.google.com/p/android/issues/detail?id=34170
The fix for me was to not run from the junit view, but rather run from the debug button on the toolbar.
I'm using ADT 20.
My solution - works with "Windows 8 Pro 64-bit", "Google Nexus" and "Android Developer Tools Build: v21.1.0-569685"
Close any Eclipse instance.
Ensure no application is listening on port 8061, you can use: NETSTAT -B in Windows command line to list all ports listened by applications. Sometimes, adb.exe or javaw.exe are still listening on 8061 port, even you think Eclipse is closed.
Close javaw.exe, adb.exe until 8061 port is free.
You'd have probably figured this out in 4 years, but I am so happy after I found the problem that I want to someone to know about it.
For me there was a breakpoint on variable declaration in MainActivity Class. This variable declaration wasn't a part of any method and the statement itself was never executing. And there was no other breakpoint in entire application. Once I put the breakpoint at correct location (onClick method), everything fell into place.
Don't know if this worked for you.

Having a problem loading the Android Emulator in Eclipse. All it says is ANDROID_. Any suggestions?

I went through the simple hello world application on the android developers forums to an absolute T. But, when I start the emulator all it comes up with is a large black screen that just says ANDROID_. The '_' is flashing. Does anyone know what may have caused this or why it is not working.
It can take a while to start. Remember it is emulating an ARM processor so that can take a while depending on the specs of your machine. Start it and give it 5 min. If it hasn't come up by then you may want to close and restart. While it is starting up, if you open ddms you can follow what is going on in logcat.
Good news is that if you enable snapshots, once you get it started and saved (it does this on its own). Subsequent starts should be pretty quick.
For some reasons, the android emulator does not work properly on any of the laptop's i have. It lags even on my high end laptop with 4 gb Ram, i5 processor and 1 gig graphics processor, so i connect my phone using usb cable, enable debugging mode and run the app on the phone from eclipse. You will need a working adb connection as stated on android developer website though. It works pretty good and is way better than using an emulator. :)
It takes about 3 mins for the emulator to load on a laptop. Wait for about 5-6 mins if not. close it.
In case when you restart still you get the same, go to AVD Manager delete the image and create a new one.
As the others have said, the emulator is very, very slow to start up. It can get wedged on startup for me, every now and again, but shutting it down and trying a second time almost always works. And yes, you can leave it running the whole time, but note that Eclipse and/or ADB can get wedged as well. You'll see logcat stop updating inside of Eclipse. I can usually get it restarted by doing
adb kill-server
adb start-server
Sometimes, just doing an adb logcat on a command line will get things moving again. Good luck.

Categories

Resources