cant run android more than once

I cant run an android app more than once in eclipse.
The default 'hell world' app only runs once.

After running the 'hello world' app once and it works I then close the emulator, and then hit run again. The program then hangs and doesnt do anything.

I dont remember this happening before?
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

If you don't close the emulator - does it run again in the same emulator ?

(Change the text of Hello, ... so that you see)
Did you go to Windows - AVD menu and set the checkbox on the emulator
(shows green chcheckbox), and select automatic

Even though I had only one slection there but before I did that it on each run created new emulator and it took a long time. After I did that itjust replaced my application in the existing emulator - it was much faster.
True, I didn;t exoerience that it hanged though even when it created new emulator.

and if it hangs - if you then restart Eclipse - would it run again OK for the first time after Ecliopse restart?
jagguyAuthor Commented:
I run the program ok.

if I change the  text to hello world 2 and run it again nothing happens other than the program tries to run again and it doesnt.

How do I edit the file and re-run the program without waiting a few minutes each time for the emulator to load?
Exploring SharePoint 2016

Explore SharePoint 2016, the web-based, collaborative platform that integrates with Microsoft Office to provide intranets, secure document management, and collaboration so you can develop your online and offline capabilities.

>How do I edit the file and re-run the program without waiting a few minutes each time for the emulator to load?

That is exactly what I achieved after I went to Windows - AVD and set the checkbox on the emulator and set checkbox to aoutomatic

after that it didn't create a new emulatorbut just put new version of program to the saem emeulator  (but you should not clsoe it of ciurse after the first run)
jagguyAuthor Commented:
i go windows - avd manager and see 2 devices with green ticks I created before.

there is no automatic option?
jagguyAuthor Commented:
I also tried the run config automatic options , change the code and rerun the program without closing emulator.

still no good
Yes, automatic is in different place - go to Run Configurations - then sleect Target tab - there I guess you'll need to have only one of two emulators checked and on top left there is automatic checkbox
I have only one emaulator - os in target screen I have that one checked and automatic checked also
jagguyAuthor Commented:
this doesnt do anything for me. I checked automatic and have the correct program on left pane and auto checked with emaulator 2.2 (choice of 2) but I select 1 of course.

then i change my code 'hello world 3' and click run....nothing happens on emulator as there is a program trying to run in the background and hangs at 27%

How do I change my code and get the emulator to display new code without closing emulaor from last time I run the pogam?
where do you cahnge your code to hello world 3 - post your code

>hangs at 27%

what that means ? and where do you get %

and what happnes when you close Eclipse and start Eclipse again
jagguyAuthor Commented:
package com.home;

import android.os.Bundle;
import android.widget.TextView;

public class Thome1Activity extends Activity {
    /** Called when the activity is first created. */
    public void onCreate(Bundle savedInstanceState) {
        TextView tv = new TextView(this);
        tv.setText("Hello, Android 3");


I run this and it works.
If I change   this line
  tv.setText("Hello, Android 3");


    tv.setText("Hello, Android 4");

and hit run , the emulator doesnt display the new code. in Progress tab in eclipse it says 27% and tries to keep running new code (it just repeats)
Yes, that is correct code and works for me
jagguyAuthor Commented:
when you change the code what do you do?
do you simply click run again ?

what is the process for changing code and running the code again without waiting for the emulator to load again.
As I told you, initially, when I didn't have those things checked and automatic - I changed the code and then clicked Run and it took again the whole time and created new emulator
(but still didn't hang)

when i checked and in Run -conf - Target screen and made automatic - after that - i click
Run as Android after changing the code and it changes the text rather quickly in the same emulator

In the console it should show you some output - any errors there when it hangs ?

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
If I were you, I'd try to create a new project - maybe something gits screwed in that project
I am also running everything in 4.0.3
jagguyAuthor Commented:
yes it worked in 4.03 as your instructions said  but not in  android AVD 2.2

so I dont want to code for 4.03 as it is too new, what do I do?
jagguyAuthor Commented:
ok it worked.

I had to create a new project again.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.