Question

I got to try an exercise 1 of notepad application just yesterday and passed through all the steps to the last one - running in an emulator.

As I am new to Android platform, I'm not a noob. I have set my android emulator, have all the SKDs, etc. Project was created for 2.2 platform and so was the emulator.

After I hit Run As -> Android application the emulator starts, but it stays only on home screen (or last screen I was on before closing the emaulator). Problem is that I cannot find this notepad application. I thought that the emulator will start up with this app running so I could check it out immediately.

I do not know much about the manifest XMLs, but when looked in it I've found that there is an activity registered, so I really don't know what (or where) the problem is. I was googling for an hours and tried every link where a problem with running sth in emulator occured, but no result...

So I'm asking You and hope somebody will help me!

Many thanks in advance!!!

shadyyx.

Was it helpful?

Solution

OK guys.

I was really pissed off. Was googling for 4 hours yesterday, and 3 hours today. Went to Troubleshooting page on android developers site, where I found these points:

  1. Quit the emulator if it is running
  2. Check that any emulator processes are killed (sometimes they can hang, use ps on unix or mac, or task manager in the process view on windows).
  3. Quit Eclipse
  4. From the command line, type: adb kill-server
  5. Start Eclipse and try again

This isn't quite accurate, so here is what helped me: As it was obvious that Eclipse is not comunicating with the emulator after it starts, I tried just the point 4 from previous troubleshoot - run "adb kill-server" while both Eclipse and emulator were running.

After I got back to the Eclipse I could see new logs in console comming up infomring me of installing the .apk and running some intent. After switching back to the emulator, what a surprise, the application was there and running!!!

A small hint how to run a command on Windows when Yoou don't have adb.exe in Your system PATH:

Open up cmd.exe, find and open a folder where Your Android SDK is installed and browse to the folder platform-tools. Then drag the file adb.exe to the cmd, write the parameter kill-server after the path to the adb.exe and hit Enter.

command now should be as my example (could vary depending on where did You install Your SDK):

"C:\Program Files (x86)\Android\android-sdk-windows\platform-tools\adb.exe" kill-server

And voila - it should be done!!!

Hope You appreciate this and that it will help many other users facing the same problem as I was...

Note: If there is nothing going on after killing of adb server (eventually You can see unsuccessful attempts to connect to adb [emulator]) just run the project again (without closing the emulator!). As I always have this problem when running a project for the first time after emulator was closed this always helps me!

OTHER TIPS

Try these steps below.

1) When the Emulator starts up with your previous activity, keep pressing the back button till you see the Home Screen.

2) Then go to Applications menu and scroll down to see your notepad application.

If your application is not seen there, then check your logcat output. Here is how you check it.

i) In Eclipse go to Window-> Show View-> Other-> Android-> Logcat

Post the output of logcat here, so that we can help you out.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top