Emulator starts but app doesn't

Common bugs/problems with the Android SDK the Emulator and the ADT-Plugin.

Emulator starts but app doesn't

Postby Skiller » Sun Nov 28, 2010 9:01 pm

Hi, I'm thinking of buying a new smart phone and I'm currently trying to decide between a WP7 phone (HTC 7 Pro) and an Android one (HTC Desire Z), and since one of the things I want to do is port an app I made for windows to it I figured I'd have a poke around with the Android SDK to help me decide.

So I've downloaded eclipse and the Android SDKs and other tools for it (ADT or something) and I followed the HelloAndroid tutorial at http://developer.android.com/resources/tutorials/hello-world.html but when I try to run the application it doesn't start and it doesn't seem to be anywhere in the emulator. The emulator runs fine and I can use it without issue, but I can't figure out how to start the HelloAndroid app :(.

I did some looking around here and found this thread that had a console dump that said something like "Uploading HelloAndroid.apk onto device 'emulator-5554'" but my console dump only contains the following:

[2010-11-29 07:00:32 - HelloAndroid] ------------------------------
[2010-11-29 07:00:32 - HelloAndroid] Android Launch!
[2010-11-29 07:00:32 - HelloAndroid] adb is running normally.
[2010-11-29 07:00:32 - HelloAndroid] Performing com.example.helloandroid.HelloAndroid activity launch
[2010-11-29 07:00:32 - HelloAndroid] Automatic Target Mode: Preferred AVD 'Android2.2' is not available. Launching new emulator.
[2010-11-29 07:00:32 - HelloAndroid] Launching a new emulator with Virtual Device 'Android2.2'

Does anyone know what might be going wrong or how to fix it?
Skiller
Developer
Developer
 
Posts: 33
Joined: Sun Nov 28, 2010 8:35 pm
Location: Australia

Top

Re: Emulator starts but app doesn't

Postby blundell » Mon Nov 29, 2010 2:30 pm

CHeck your run confirgurations. I think you have automatic selection on. If you change this to manual, run up your emulator and then run your app it should start.
User avatar
blundell
Master Developer
Master Developer
 
Posts: 1610
Joined: Tue Nov 18, 2008 12:58 pm
Location: UK

Re: Emulator starts but app doesn't

Postby Skiller » Mon Nov 29, 2010 4:09 pm

That didn't work :(, same thing keeps happening, except that way I need to keep manually starting a new emulator through a dialog that pops up :(.

However I stuffed around with adb for a few hours today and found that once the emulator is running if I use "adb devices" the emulator does not show up, but if I run "adb kill-server" and then "adb start-server" while the emulator is running then it does show up (before the original post I had tried that before the emulator was running with no success). After doing that if I just leave the emulator running in the background then hitting run in eclipse does work properly the app gets installed to the emulator and then runs correctly :D. But if the emulator is ever closed then I need to kill and start adb again :(

So I can develop now, but having to kill and start adb like that is a bit of a pain so if anyone knows how to fix that it'd be appreciated.

BTW I probably should have mentioned that I'm using Vista Ultimate x64, eclipse galileo and the latest versions of the android SDKs and tools.
Skiller
Developer
Developer
 
Posts: 33
Joined: Sun Nov 28, 2010 8:35 pm
Location: Australia

Re: Emulator starts but app doesn't

Postby manar » Thu Dec 02, 2010 10:58 am

I registered to say I have exactly the same problem . Running latest SDK , galileo , Windows 7 x64 .
Thanks Skiller for the tip as killing/starting daemon works for me ... I'm wondering if this issue is related somehow to x64 security and the need to run applications as Administrator ?
manar
Once Poster
Once Poster
 
Posts: 1
Joined: Thu Dec 02, 2010 10:04 am

Re: Emulator starts but app doesn't

Postby Skiller » Thu Dec 02, 2010 3:12 pm

I doubt it's related to needing to run as administrator since I'm using an administrator account.
Skiller
Developer
Developer
 
Posts: 33
Joined: Sun Nov 28, 2010 8:35 pm
Location: Australia

Re: Emulator starts but app doesn't

Postby blundell » Thu Dec 02, 2010 3:24 pm

It's to do with 64bit windows, eclipse is a bit flaky for it
User avatar
blundell
Master Developer
Master Developer
 
Posts: 1610
Joined: Tue Nov 18, 2008 12:58 pm
Location: UK

Top

Re: Emulator starts but app doesn't

Postby jp_ksj » Fri Dec 03, 2010 7:47 am

Hi Guys,

When u run eclipse in x64, Continue with unregistered installation while updating ADT in Eclipse. This will work. But while create new project or Import, It will show error. Just clean workspace it will work perfectly.

Thanks,
JP
jp_ksj
Junior Developer
Junior Developer
 
Posts: 19
Joined: Tue Dec 22, 2009 6:39 am

Top

Return to SDK/ADT/Emulator Problems

Who is online

Users browsing this forum: No registered users and 7 guests