0

while i'm developing my android app on my HTC sensation, i can't run the app directly from eclipse. this problem only occurs when i'm using ICS phones and it's almost a hit or miss, the app would start sometimes without actually reinstalling, it would just start the old version of my app; other times it would work perfectly for a while before it stops starting the app...

the console shows this for everything(working , not working, not updating etc)

[2012-03-21 21:08:57 - ActionBarSherlock] /Users/tom91136/Downloads/android-sdk-mac_x86/platform-tools/aapt crunch -v -S /Users/tom91136/Dropbox/workspace_sora_client/ActionBarSherlock/res -C /Users/tom91136/Dropbox/workspace_sora_client/ActionBarSherlock/bin/res 
[2012-03-21 21:08:57 - ActionBarSherlock] Crunching PNG Files in source dir: /Users/tom91136/Dropbox/workspace_sora_client/ActionBarSherlock/res
[2012-03-21 21:08:57 - ActionBarSherlock] To destination dir: /Users/tom91136/Dropbox/workspace_sora_client/ActionBarSherlock/bin/res
[2012-03-21 21:08:57 - ActionBarSherlock] Crunched 0 PNG files to update cache
[2012-03-21 21:08:57 - YUKI] Starting full Post Compiler.
[2012-03-21 21:08:57 - YUKI] ------------------------------
[2012-03-21 21:08:57 - YUKI] Android Launch!
[2012-03-21 21:08:57 - YUKI] adb is running normally.
[2012-03-21 21:08:57 - YUKI] Performing com.sora.cbir.yuki.image.leaf.Init activity launch
[2012-03-21 21:08:58 - YUKI] Uploading YUKI.apk onto device 'HT174V803256'
[2012-03-21 21:09:00 - YUKI] Installing YUKI.apk...
[2012-03-21 21:09:01 - YUKI] Success!
[2012-03-21 21:09:01 - ActionBarSherlock] Could not find ActionBarSherlock.apk!
[2012-03-21 21:09:01 - YUKI] Starting activity com.sora.cbir.yuki.image.leaf.Init on device HT174V803256

a full restart of the phone would fix the problem temporarily, but then it would happen again if i re-plug the usb cable or just simply quit my app

this does not happen on emulators of any version , also gingerbread phones

any ideas on how to solve this issue? it's very annoying to restart my phone all the time

PS: restarting eclipse doesn't help, rebooting also doesn't work

tom91136
  • 8,662
  • 12
  • 58
  • 74

3 Answers3

1

Have you enabled Allow installation of non-Market applications in your new phone? If not check that check box you might be able to install your application.

AndroidDev
  • 2,627
  • 6
  • 29
  • 41
1

go to the run configurations of your project by right clicking on you project ...then go to target ...in that there will be a checkbox called wipe user data. check whether its checked or not. If not then enable it. This will wipe out the previous installed apps from the phone and reinstall your app each time you run you project so that you don't need to restart your emulator each time.

Hope this helps.

Nav
  • 10,304
  • 20
  • 56
  • 83
  • it only happens to actual device, not emulators – tom91136 Mar 21 '12 at 13:50
  • @Tom91136 which 1 doesn't happen "wipe user data" or the problem you are facing ??? – Nav Mar 21 '12 at 13:53
  • the problem i'm facing does not happen in emulators; it ONLY happens on real device – tom91136 Mar 21 '12 at 13:55
  • you can try killing the adb server if that happens by typing adb kill-server and then restarting it via adb start-server in the console window...the adb server sometimes gets corrupted or gets busy doing something else so you need to restart it – Nav Mar 21 '12 at 14:00
  • tried it, thought it would work, but it didn't. can it be the phone's problem? – tom91136 Mar 21 '12 at 14:06
  • 1 thing just saw in from your console output is "ActionBarSherlock] Could not find ActionBarSherlock.apk!" which sometimes do happen when the project build couldn't be made for the current version so the previously saved build gets installed . try to clean your project by clicking on project ---> clean – Nav Mar 21 '12 at 14:10
  • let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/9145/discussion-between-tom91136-and-nav) – tom91136 Mar 21 '12 at 14:12
1

Can you try Restarting the adb Server. You can do this by two ways. one is from the eclipse and other is from the command prompt.

  1. Eclipse: Open the sub Window 'devices'. In that window click on the right top triangle symbol where you will be having the reset adb option.

  2. Command Prompt:

Open Command prompt. Move to the android sdk path. Move to the platform tools.Type below commands.

adb kill-server
adb start-server

You can also try installing the application after uninstalling the previous existing application.

Pavandroid
  • 1,586
  • 2
  • 15
  • 30