Eclipse + Android SDK bugs and workarounds, common mistakes


If you have already used Eclipse with Android SDK, you probably have some experience with known and unknown bugs. I'd like to show you some of these, and help you how to solve them.
First of all, if you got the following message from the running Emulator, except that the process is your Project, then you have to open up DDMS.
You can find DDMS button in the upper-right corner of Eclipse. Once you are in DDMS, Select your running Emulator from the left, and see what is happening by Clicking on LogCat tab (bottom of the screen).
Scroll all the way down, then start scrolling upwards, until red-colored lines show up. Probably you have NullPointer Exception or something like that, so I can't help you on that one, but I try my best to solve some other problems that you may have had.

1.Android Version 1.6 (Level 4) DDMS bug:

„emulator-5554 disconnected! Cancelling „

When you are running an emulator with the version mentioned, and you go to DDMS Tab ? File Explorer, then after a few seconds your emulator is going to be disconnected. Reason unknown, but there's a workaround although not the best..

Solution:
If you want to use File Explorer: Right Click on your Project, Properties - Android, and select the version 2.1 (Level 7).
Save your Project. After you've tested everything you want in File Explorer, change your version settings back.
If you don't need File Explorer: Simply close the File Explorer Tab in DDMS.

2.emulator: ERROR: the user data image is used by another emulator. aborting:

[2010-03-18 09:00:40 - PhoneLister]Android Launch!
[2010-03-18 09:00:40 - PhoneLister]adb is running normally.
[2010-03-18 09:00:40 - PhoneLister]Performing com.xy activity launch
[2010-03-18 09:00:40 - PhoneLister]Automatic Target Mode: Preferred AVD 'android16emu' is not available. Launching new emulator.
[2010-03-18 09:00:40 - PhoneLister]Launching a new emulator with Virtual Device 'android16emu'
[2010-03-18 09:01:06 - Emulator]emulator: ERROR: the user data image is used by another emulator. aborting

Solution:
That means you have to close your already running Emulator, then Eclipse is going to start a new one if you click on Run/Run Debugger again.
The reason can be many various things, for instance the bug we've discussed above.

3.Toast doesn't print/show text:

It's actually not a bug. Sometimes you can easily forget to add the „.show()” method by mistake.
So instead of: Toast.makeText(this, "blabla", 3);
use: Toast.makeText(this, "blabla", 3).show;

4.Changes in codeline don't have any effect when an Emulator is running:

This is a minor problem. Sometimes your emulator data-image file is not updating itself, so no matter what's in the codeline, actually you are running a previous version of your Application. (Even after several „re-Run”)

Solution:
Restarting emulator with the option „Wipe User Data” solves the problem.

At last, but not least, you may have to restart your Eclipse workspace once in a while, to get things working again. I hope you found this article helpful, and feel free to add comments and share bugs/solutions that you know.

Comments

Eclipse + Android SDK bugs and workarounds, common mistakes

That means you have to close your already running Emulator, then Eclipse is going to start a new one if you click on Run/Run Debugger again. look into
horses for sale

I still keep getting these

I still keep getting these errors, is there a support forum where someone can help me troubleshoot my problems?

@This will stop the daemon and this helped me alot thanks

acne treatment

Cool stuff

Good presentation and thank Bence!

jeu

I'm having problem

I'm having problems whenever i do "check for updates" and try to isntall updates and when I try to install the Android Plugin. In both cases I get the same errors.
Acne Treatment

Saved me a serious headache...

Hey thanks a ton for the solution. I've been banging my head on this all day! Thanks again. Bob Marley hoodies

Excellent design of a new android thing

I have to close your already

I have to close your already running Emulator, then Eclipse is going to start a new one if you click on Run/Run Debugger again. This may help better.
whole house surge protector

If reinstalling all of

If reinstalling all of Eclipse from scratch, are there any additional
steps other then uninstalling Eclipse, removing the Androd DDMS/
DevTools/SDK and reinstalling them?
washington dc doctors

Error

I tried this widget before, but all I got was errors. Now, not saying there is a problem with it - just saying I'm none too bright. Maybe this post will help me resolve the issues.
Personalised Pencils | First Birthday Presents | Christening Gifts For Boys | Gift Ideas

This was the first widget I

This was the first widget I have ever tried to make and I have to say that its harder than it looks. I want to thank you for teaching me how to do this, I know this had to take you a long time to put together. Christening Gifts | Online Poker Room Reviews

I had this bug, thanks for

I had this bug, thanks for sharing the solution!
bracelet homme design

I searched Google and someone

I searched Google and someone suggested to install 32-bit Eclipse Java Enterprise Edition first and then to install a “limited” 64-bit edition. This way all the necessary components are present and Android plug-in installs. Spotify Invite | Wizaz Forum

Update

Just update to the latest firmware that seems to fix these problems.

Regards,
C. Potty

great

Thanks for sharing such a useful information! This is a great post, thnks
lyrics

I had same bugs

I had same bugs too. Thanks for sharing.

HostGuin | DWKZONE | Vegetarian Info

Good job on the post, and

Good job on the post, and I've just became subscribed to your site.
Banking Info | Smart Review | Budget News

First of all, if you got the

First of all, if you got the following message from the running Emulator, except that the process is your Project, then you have to open up DDMS.

http://www.cartransportquotes.com

finally!

Good, I was looking to solve this eclipse problem and was linked here, thanks :)

Info on rosacea and cosmetics for rosacea.

That is best running an

That is best running an emulator with the version mentioned, and you go to DDMS Tab ? File Explorer, then after a few seconds your emulator is going to be disconnected. Games for girls | how to get pregnant

Thanks for the post! I always

Thanks for the post! I always face such situation when something doesn't work in my phone and i have no idea how to fix it. Of course Google is of a great use in moments like these, however, it's always a pleasure to find some really professional help and advice.
________________
MBA Study

When you are running an

When you are running an emulator with the version mentioned, and you go to DDMS Tab ? File Explorer, then after a few seconds your emulator is going to be disconnected. Reason unknown, but there's a workaround although not the best..Red guitar

First of all, if you got the

First of all, if you got the following message from the running Emulator, except that the process is your Project, then you have to open up DDMS.Gibson Double Neck

You can find DDMS button in the upper-right corner of Eclipse. Once you are in DDMS, Select your running Emulator from the left, and see what is happening by Clicking on LogCat tab (bottom of the screen).
Three years ago we found out all about it.

Toast doesn't print

I had few agonizing hours getting around this issue. The work-around you have provided is nice. Oat Bran Nutrition

Hey thanks for decoding the

Hey thanks for decoding the bugs so that i can avoid it for my emulator. I'm having a project in my college where i need to make a similar emulator and this is helpful to avoid such bugs and save my time.
trampolines

That means you have to...

That means you have to close your already running Emulator, then Eclipse is going to start a new one if you click on Run/Run Debugger again. The reason can be many various things, for instance the bug we've discussed above.
earth4energy grow taller Electronic Cigarette tava tea error fix

Yes, this is so bad

Yes, it is so bad. I was trying to access a Get whiter teeth website and the websites were widget based and scrambled. They have to fix this and if not I am sure they will be losing hell a lot of business.

Thanks for the solution to

Thanks for the solution to the problem "emulator-5554 disconnected!". I was looking for it and it is for me very useful. Steven from mahjong and crazy taxi tips and tricks.

A very good geek info. Thank

A very good geek info. Thank you for this suggestion. Daemon bug often, if you restar this when you get a error and that's ok

I've found an easier and

I've found an easier and faster way to fix this one. Open a CMD console, and type the following commands:
adb kill-server
adb devices
scabies

I have been a big fan of

I have been a big fan of Cpanel for a long time and its nice to see there is an alternative out there. Thanks you for putting this togeather for me.tanning lotion

Good widget

I use this widget and it's seems very good

actualités ipad

I like this widget. This was

I like this widget. This was the first widget I have ever tried to make and I have to say that its harder than it looks. I want to thank you for teaching me how to do this, I know this had to take you a long time to put together.
Enclosed trailers for sale

This will stop the daemon and

This will stop the daemon and then restart it. It always fixes this error for me and it is a lot faster than entirely restarting the emulator.
electric guitars

I had same bugs too thx for

I had same bugs too thx for this post ! ;)

Money Tips Website

nice

That is best running an emulator with the version mentioned, and you go to DDMS Tab ? File Explorer, then after a few seconds your emulator is going to be disconnected. Reason unknown, but there's a workaround although not the best..export import germany

I am getting the same errors

I am getting the same errors again and again. I have to close your already running Emulator, then Eclipse is going to start a new one if you click on Run/Run Debugger again. This may help better.
Flash website

ERROR: the user data image is used by another emulator. aborting

I've found an easier and faster way to fix this one. Open a CMD console, and type the following commands:
adb kill-server
adb devices

this will stop the daemon and then restart it. It always fixes this error for me and it is a lot faster than entirely restarting the emulator.

you're right.

Thanks for the suggestion!

Creatherm agree ^^

absolutely agree ! Now that I'm no more molested by this bug, I can go back to code the Creatherm website. Thx for the advices !