0

I'm working on Phonegap for few days. Before this I was able to run phonegap apps into emulator through command line successfully, but now that's showing a peculiar hang; nothing happening no error, no flow of execution. State of my APP run

Now I'm running my apps by installing the .apk file directly through Android command line. But, still I want to know why it's not working, why this run command hangs there?

Hazem Hagrass
  • 9,329
  • 10
  • 32
  • 54
Pradyumna Swain
  • 1,128
  • 1
  • 12
  • 21

2 Answers2

0

In my case ADB DEVICES displayed me invalid devices, an ADB KILL-SERVER solved this for me.

i suspect that is was caused by a my laptop going into sleep mode.

Martijn
  • 1,440
  • 11
  • 18
0

when it says trying to install app onto device the command is actually running adb install C:/yourpath/yourapp.apk which copies the app the android installation.

You shouldn't worry if it takes a long time. The installation is proceeding as planned, just be patient. The bigger your app, the longer is takes. For me a ~300MB app takes a full 7 mins to install to an attached device via USB. And the same app will take 13 mins to install to an Android emulator.

The emulator is known to be slow, there's a big SO thread regarding this issue here - Why is the Android emulator so slow? How can we speed up the Android emulator?

Community
  • 1
  • 1
James Wong
  • 4,529
  • 4
  • 48
  • 65
  • Correct me if i'm wrong, first it tries to search whether an active device is connected or not, if not it will search for emulator automatically after that it will do as mentioned by you. The problem here is that neither i don't have active devices connected nor my emulator is slow nor my app size is bigger(less than 3mb) and also i have waited for one hour also still it's not moving forward. – Pradyumna Swain Feb 24 '14 at 03:17
  • You are correct, `adb install` will automatically look for an active device and will fail if more than 1 device is connected. In this case, add the -V to see what's going on. – James Wong Feb 24 '14 at 03:24
  • does anyone encountered adb hung at the install and when copied the debug apk to the device and manually installed it from there, the apk does not install? Through Android Monitor it says I cant install app, error code is 103.. – niCad Sep 09 '16 at 01:29