Android Failed to install HelloWorld.apk on device (null) Error

前端 未结 22 1626
走了就别回头了
走了就别回头了 2020-11-28 23:37

I am new to Android. When I am running my android application in eclipse I am getting these messages in the console:

[2011-03-08 12:57:35 - HelloWorld] ----         


        
相关标签:
22条回答
  • 2020-11-29 00:00

    I get this from time to time, but it's usually related to the emulator being slow to start. Try again without closing the emulator between the retries. And if it still fails, please post the client logs (logcat).

    Another reason can be a ghost Eclipse process running in background and still bound to the debugging port. Close eclipse, look at process list and see if there's still an Eclipse running. Kill all of them and restart Eclipse again.

    0 讨论(0)
  • 2020-11-29 00:01

    As for me, I had the same problem and it helped to increase SD volume and max VM app heap size. (Android SDK and AVD manager - Virtual device - Edit) What is interesting, the back change of SD and heap to the previous values is OK, too. That means, that any change of emulator parameters and its rebuilding is enough. (Simple restart won't help)

    0 讨论(0)
  • 2020-11-29 00:02

    I was facing this problem time and again.Got around a lot of forums, but couldn't find a logical solution for the issue.

    I used to get this error message, . . . Uploading test.apk onto device 'emulator-5554' Failed to install test.apk on device 'emulator-5554': timeout Launch canceled!

    this error is thrown as the start of emulator and deployment of application takes some significant time and before that the emulator times out.

    A simple fix for this problem is keeping the emulator open when this problem occurs, *just run the application again. This only deploys the application on to the already started emulator *. There is not much time consumed during this run as the major part of the time during app deployment is because of slow start up of emulator.

    Hope this helps!

    0 讨论(0)
  • 2020-11-29 00:05

    Just try the following steps,

    1. Go to Home screen before you start to run the application.
    2. No need to uninstall every time. Just uninstall your application once properly.

      Go to Setting -> Manage Application -> click menu -> filter -> Third party application. Check whether your application is there or not.

    3. After modifying your application just save it. Right click your project and select "Run as Android application".
    4. Note: once again, before running your application check whether or not your emulator is showing the home screen.

    going to home screen: from eclipse go to menus: window->android virtual device->start

    0 讨论(0)
  • 2020-11-29 00:06

    @Bolton 's answer worked for me. Some details...

    I got my phone a few weeks ago. I tried the HelloAndroid sample app right away (after installing req'd software, etc.). The app worked in the emulator AND on the phone--right away!

    Shortly after that, I rooted my phone but did not flash any roms or kernels. I was only experimenting on the emulator until yesterday (writing a simple notepad app). When I tried debugging the app on the phone, here's what I observed:

    1. Eclipse console reported the "...failed to install on device...(null)" message. BUT

    2. The HelloAndroid app DID get pushed to the phone! (It appeared in the apps drawer AND I was able to launch it.)

    3. It simply would not launch on the phone from the Eclipse run.

    I searched around here and elsewhere last night (including this thread) with no luck. Finally, I rebooted my phone--which I never tried (doh!) 'cause I didn't think it would make a difference--and the app launched from an Eclipse start!

    Still don't know the cause, but I'll come back here if I figure it out.

    0 讨论(0)
  • 2020-11-29 00:06

    restart the ADT or Try changing the ADB connection timeout. I think it defaults that to 5000ms and I changed mine to 10000ms to get rid of that problem. If you are in Eclipse, you can do this by going through Window -> Preferences and then it is in DDMS under Android.

    0 讨论(0)
提交回复
热议问题