android模拟器不显示应用程序 [英] android emulator doesn't display app

查看:1802
本文介绍了android模拟器不显示应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我安装了phonegap cli和android sdk cli。
我试图创建一个带有默认参数的新项目:
phonegap create -n-namemypoc--idcom.cavissima.poc--template hello-world

I installed phonegap cli and and android sdk cli. I tried to create a new project with default parameter : phonegap create -n-name "mypoc" --id "com.cavissima.poc" --template hello-world

之后添加Android平台测试:

after what i added android platform for testing :

phonegap platform add android

最后我试图在Android模拟器上启动它:

And finally i tried to launch it on android emulator :

phonegap run android --verbose

看到很多关于这个动作的循环:

in the command line i see a lot of loop on this action:

Running command "getprop emu.uuid" on emulator-5554...

当最终的android模拟是displying我不能找到我的应用程序it.if it
注意:当试图在模拟器搜索应用程序部分中键入一些文本时,Android运行realy:它需要3秒显示每个字符...

when finaly the android emulated is displying i can't find my app in it.if it note: the android run realy when trying to type some text in the emulator search app section : it takes 3 seconds to display each character...

当我停止模拟器我可以看到这在命令行部分:

When i stop the emulator i can see this in the command line section:

    Error: CordovaError: Failed to execute shell command "getprop,emu.uuid"" on device: Error: C:\Users\pvali\AppData\Local\Android\android-sdk\platform-tools\adb.exe: Command failed with exit code 4294967295 Error output:
error: protocol fault (couldn't read status): No error
    at d:\Projets\cavi\mobileapp\POC\mypoc\platforms\android\cordova\lib\Adb.js:82:25
    at _rejected (d:\Projets\cavi\mobileapp\POC\mypoc\platforms\android\cordova\node_modules\q\q.js:844:24)
    at d:\Projets\cavi\mobileapp\POC\mypoc\platforms\android\cordova\node_modules\q\q.js:870:30
    at Promise.when (d:\Projets\cavi\mobileapp\POC\mypoc\platforms\android\cordova\node_modules\q\q.js:1122:31)
    at Promise.promise.promiseDispatch (d:\Projets\cavi\mobileapp\POC\mypoc\platforms\android\cordova\node_modules\q\q.js:788:41)
    at d:\Projets\cavi\mobileapp\POC\mypoc\platforms\android\cordova\node_modules\q\q.js:604:44
    at runSingle (d:\Projets\cavi\mobileapp\POC\mypoc\platforms\android\cordova\node_modules\q\q.js:137:13)
    at flush (d:\Projets\cavi\mobileapp\POC\mypoc\platforms\android\cordova\node_modules\q\q.js:125:13)
    at nextTickCallbackWith0Args (node.js:420:9)
    at process._tickCallback (node.js:349:13)

可以帮助android avd我设置的选项是:
模拟器描述

can help the option of the android avd i setted up are: emulator description

推荐答案

对不起,我没有足够的注释,所以我不知道这应该去哪里,但这通常发生在我的模拟器在重新启动后,我第一次运行。

Sorry, I don't have enough points to comment, so I am not sure where this should go but this usually happens to me as well on my first run of the emulator after a reboot.

模拟器不显示应用程序,因为根据错误运行命令getprop emu.uuid在emulator-5554 ... 它无法在模拟器中定义必需的属性。

The emulator doesn't display the app because based on the error Running command "getprop emu.uuid" on emulator-5554... it wasn't able to define a required property in the emulator.

因此,它无法继续构建,部署和安装应用程序到模拟器。

Thus, it wasn't able to proceed to build, deploy and install the application to the emulator.

假设在www文件夹中没有更改,请关闭您的模拟器,并尝试以下操作:

Assuming that nothing is changed in the www folder, close your emulator and please try the following:


  1. phonegap build android --verbose

  1. phonegap build android --verbose

确认应用程式是否确实没有错误。

Confirm whether the app really does build without error.


  1. phonegap运行android --verbose

  1. phonegap run android --verbose


    此时,您将看到您所看到的在emulator-5554 ...上运行命令getprop emu.uuid... ,因为它加载了模拟器。

At this point, you will see what you saw Running command "getprop emu.uuid" on emulator-5554... as it loads the emulator.

如果在主屏幕加载后没有任何反应, Ctrl + C 可停止。然后不关闭仿真器,再次输入以下命令。

If nothing happens after the home screen loads, Ctrl + C to stop it. Then without closing the emulator, enter the following command again.


  1. phonegap运行android --verbose

  1. phonegap run android --verbose

您不能看到
在emulator-5554上运行命令getprop emu.uuid 。
而不是你应该看到在emulator-5554 ...上运行comandcat / proc / cpuinfo...

如果没关系,您应该可以通过CLI观察已经开始在模拟器上构建和安装。

If it's okay, you should be able to observe through the CLI that the has started to build and install on the emulator.

PS。我建议您在仿真选项 Snapshot 使用主机GPU c $ c>为了给你的模拟器一个提升。要了解哪一个适合您的开发,请参考这里:

PS. I recommend that you check either Snapshot or Use Host GPU in the Emulation Options in order to give your emulator a boost. To know which one suits your development, please refer here:

http://android.stackexchange.com/questions/51739/what-is-snapshot-and-use-host-gpu-emulation-options-for

这篇关于android模拟器不显示应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆