离子:安卓模拟器错误

3

我正在尝试使用Android Studio v3.0附带的Android模拟器测试我的Ionic(3.16.0)混合应用程序。/myapp> ionic cordova build android成功创建了构建。但是,当我运行/myapp> ionic cordova emulate android时,模拟器启动并加载屏幕,但是我无法在模拟器中找到我的应用程序。此外,终端日志中看到了以下堆栈跟踪:

Waiting for emulator to start...

emulator: Requested console port 5584: Inferring adb port 5585.
Hax is enabled
Hax ram_size 0x40000000
HAX is working and emulator runs in fast virt mode.
emulator:
Listening for console connections on port: 5584
emulator: Serial number of this emulator (for ADB): emulator-5584
Error: Failed to execute shell command "getprop,dev.bootcomplete"" on device: Error: C:\Users\ilourdus\AppData\Local\Android\Sd
k\platform-tools\adb.exe: Command failed with exit code 1 Error output:
error: device unauthorized.
This adb server's $ADB_VENDOR_KEYS is not set
Try 'adb kill-server' if that seems wrong.
Otherwise check for a confirmation dialog on your device.

我已经运行了adb服务器并将platform-tools路径添加到系统PATH中。我使用的是Cordova 6.5.0版本。
请帮我查看上述日志中的错误,并告诉我如何在模拟器中启动我的应用程序。
2个回答

1

在我将CPU/ABI镜像从“Google Play...(x86)”更改为“Google API...(x86)”后,此问题得到解决。


1
我该怎么做?为什么这些答案也缺乏信息呢? - João Pimentel Ferreira
请提供完整的细节,告诉我在哪里可以找到这个。 - Grizzly Bear

0
重新启动ADB服务器: 打开命令提示符或终端,并运行以下命令:
- 对于Windows系统:
adb kill-server adb start-server - 对于macOS/Linux系统:
sudo adb kill-server sudo adb start-server - 然后,尝试重新运行您的模拟器。

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接