简体   繁体   English

Phonegap run android命令挂起,尝试将应用程序安装到设备上

[英]Phonegap run android command hangs on trying to install app onto device

I'm working on Phonegap for few days. 我在Phonegap上工作了几天。 Before this I was able to run phonegap apps into emulator through command line successfully, but now that's showing a peculiar hang; 在此之前,我能够通过命令行成功地将phonegap应用程序运行到模拟器中,但是现在却显示出异常的挂起。 nothing happening no error, no flow of execution. 什么都没有发生,没有错误,没有执行流程。 我的APP运行状态

Now I'm running my apps by installing the .apk file directly through Android command line. 现在,我通过直接通过Android命令行安装.apk文件来运行我的应用程序。 But, still I want to know why it's not working, why this run command hangs there? 但是,我仍然想知道为什么它不起作用,为什么这个运行命令挂在那里?

In my case ADB DEVICES displayed me invalid devices, an ADB KILL-SERVER solved this for me. 在我的情况下,ADB设备向我显示了无效的设备,ADB KILL-SERVER为我解决了这个问题。

i suspect that is was caused by a my laptop going into sleep mode. 我怀疑这是由我的笔记本电脑进入睡眠模式引起的。

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. 当它说trying to install app onto device该命令实际上正在运行adb install C:/yourpath/yourapp.apk ,它将应用程序复制到android安装中。

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. 对我来说,〜300MB的应用程序需要花费整整7分钟的时间才能通过USB安装到连接的设备上。 And the same app will take 13 mins to install to an Android emulator. 而同一应用将需要13分钟才能安装到Android模拟器。

The emulator is known to be slow, there's a big SO thread regarding this issue here - Why is the Android emulator so slow? 众所周知,该模拟器运行缓慢,这里有一个关于此问题的大型SO线程- 为什么Android模拟器如此慢? How can we speed up the Android emulator? 我们如何加快Android模拟器的速度?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM