Why does eclipse freeze when installing apk in android emulator?

I looked at a lot of similar questions here, but all of them had a different problem (the .apk installation actually failed), or the solutions that worked for them did not work for me, so I apologize if this question seems like a reposition.

The problem I am facing is that when I try to run an Android application in an emulator in eclipse, apk will never be installed. The emulator itself works fine (all applications by default work correctly, the settings are correct, etc.), but the application that I am trying to check is never installed on the "phone". It never appears in the application list or starts, and I never receive confirmation that the installation is complete. (A launch application is installed in the launch configuration)

Here is the corresponding console output, with the names changed:

[2011-10-19 10:54:45 - dining-android] Android Launch! [2011-10-19 10:54:45 - dining-android] adb is running normally. [2011-10-19 10:54:45 - dining-android] Performing <src path>.Main activity launch [2011-10-19 10:54:45 - dining-android] Automatic Target Mode: using existing emulator 'emulator-5554' running compatible AVD '1.5test' [2011-10-19 10:54:45 - dining-android] Uploading <appname>.apk onto device 'emulator-5554' [2011-10-19 10:54:59 - dining-android] Installing <appname>.apk... 

It doesn't seem to matter if I launch the emulator manually, and then try to run the application or run the application and let it run the emulator automatically, it will never pass this step. I left it to work for about 8 hours (night), and nothing has changed. The application is for the same version of Android as the emulator, and everything looks right in the emulator and eclipse settings, as far as I can tell, except that it never completes the installation of the application.

Does anyone know why this will happen? I tried restarting adb using different versions of the emulator and / or applications, changing the default startup configuration and various other solutions that I came across on the Internet that seem to have no effect. I would really appreciate help in this if someone comes across something like that.

EDIT: I just tried using the "adb install" command on the command line of the .apk application while the emulator was running, and it was also unsuccessful. I don’t know if this or another problem is connected.

EDIT2: Installing the command line using the "adb install" function is performed correctly. However, eclipse still cannot install the application. Does anyone know what might cause this?

+8
android eclipse android-emulator
source share
6 answers

I had this problem before, I don’t remember how I solved it (it was a long time ago).

I personally suggest reinstalling sdk and the ADT plugin and make sure you follow the steps on the developer's website. I'm not sure that signing the package is due to the fact that eclipse does not install it on your phone or emulator - you only need to sign it if you are going to launch it on the market (or if you are trying to install it on phones that are not developers).

Another thing you could try is to create a new Android project (as a simple greeting application) and try to install it. If it is not installed, you have a problem with eclipse and / or sdk.

You can also just completely erase the eclipse and sdk and start from scratch. (Again, follow the instructions on the Android developer website ...)

http://developer.android.com/sdk/eclipse-adt.html

http://www.eclipse.org/downloads/packages/eclipse-ide-java-developers/indigosr1

Good luck.

+1
source share

I had the same problem when I tried to run an Android application on the device. Eclipse went 100% CPU usage and it no longer responded. I had to kill Java processes to close eclipse every time I ran the application. As part of a workaround, I removed Android plugins from eclipse, updated my androids in my inbox, and installed a new new eclipse. I killed the adb server and restarted it several times. After all this, I had the same problem. The solution came when I tried with another phone and voila ... Magically the problem disappeared. I tried using Samsung SIII (GTI9300 - OS 4.1.2) there was some problem with this phone, because when I tried to use another Razor-I phone (XT890 - OS 4.0.4). I used another SIII (GTI9300 - OS 4.1.2) and it worked too. Maybe the solution is not the best, but it was effective for me. If you have no chance to change your phone, I recommend that you dig Android binaries outside your eclipse into your phone’s configurations.

Hope this helps.

+3
source share

I am struggling with the same issue today. And thanks to eplewis89 , he was offering the right things. For me, the problem was in ADT. I upgraded the ASDK to the highest version, and the ADT started shouting about compatibility for this, and also suggested updating myself. But I selected only some parts that, as I thought, would be enough for development. Actually this mistake cost me half a day.

Help β†’ Check for updates , and updating all ADT materials solved the problem.

+1
source share

I also had this problem. I tried everything I could find on the net, and none of this worked for me.

This is not the solution you want to hear, but what worked for me is to refuse to install Eclipse Helios and install a new installation of Eclipse Indigo, and then install Android Dev Tools.

+1
source share

I ran into this after a crash and an emulator process appeared that was still running in the background.

The solution for me was to kill adb (using ps -ef | grep adb and kill ) and any running emulators (using ps -ef | grep avd and kill ). Then I restarted adb:

 cd /path/to/android-sdk-linux/platform-tools ./adb start-server 
0
source share

Go to Android \ android-sdk \ platform-tools in cmd and enter the logcat command Then try installing apk on the emulator again and paste the log here

-2
source share

All Articles