繁体   English   中英

android模拟器不显示应用程序

[英]android emulator doesn't display app

我安装了phonegap cli和android sdk cli。 我尝试使用默认参数创建一个新项目:phonegap create -n-name“mypoc”--id“com.cavissima.poc”--template hello-world

之后我添加了android平台进行测试:

phonegap platform add android

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

phonegap run android --verbose

在命令行中,我看到这个动作有很多循环:

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

当finaly android模拟正在显示我无法在其中找到我的应用程序。如果它注意:当试图在模拟器搜索应用程序部分中键入一些文本时,android运行真的:显示每个字符需要3秒钟...

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

    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的选项是: 模拟器描述

抱歉,我没有足够的评论意见,所以我不知道应该去哪里,但这通常发生在我重新启动后第一次运行模拟器时。

模拟器不显示应用程序,因为基于Running command "getprop emu.uuid" on emulator-5554...上的错误Running command "getprop emu.uuid" on emulator-5554...它无法在模拟器中定义必需的属性。

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

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

  1. phonegap build android --verbose

确认应用程序是否确实构建没有错误。

  1. phonegap run android --verbose

此时,您将Running command "getprop emu.uuid" on emulator-5554...看到您所看到的Running command "getprop emu.uuid" on emulator-5554...因为它加载了模拟器。

如果主屏幕加载后没有任何反应,请Ctrl + C停止它。 然后在不关闭模拟器的情况下,再次输入以下命令。

  1. phonegap run android --verbose

您应该无法Running command "getprop emu.uuid" on emulator-5554...看到Running command "getprop emu.uuid" on emulator-5554...相反,您应该Running command "getprop emu.uuid" on emulator-5554...看到Running comand "cat /proc/cpuinfo" on emulator-5554...

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

PS。 我建议您在Emulation Options中选中SnapshotUse Host GPU ,以便为您的仿真器提供支持。 要了解哪一个适合您的开发,请参考此处:

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

暂无
暂无

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

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