使用 'ionic emulate android' 命令时 Android 模拟器不安装应用程序

标签 android cordova ubuntu ionic-framework

我是 Ionic 和 Android 编程的新手,所以如果有任何不便,我很抱歉。

我的问题是我无法在模拟的 Android 虚拟设备上看到我的应用程序(教程中的默认应用程序)。在我运行 ionic emulate android 之后,它基本上只显示一个普通的 android 手机。所以我假设该应用程序未安装在模拟器上。

它构建了 apk,但似乎没有对其执行任何操作。 我想我正确地安装了 everythink:

> duc@duc-ThinkPad-T450s:~/myApp$ ionic info Your system information:
> Cordova CLI: 6.0.0 Ionic Version: 1.2.4 Ionic CLI Version: 1.7.14
> Ionic App Lib Version: 0.7.0 OS: Distributor ID: Ubuntu Description:
> Ubuntu 14.04.4 LTS Node Version: v4.4.1

我希望你能帮助我,只是想让教程继续下去:)

你好,杜克

编辑:

I finally managed to install the apk manually to the emulated device using this command:

 adb -s <your emulator> install </your/apk/path>

However installing it manually is very inconvenient and annoying. Anyone has a solution for this?

最佳答案

问题解决了! 你必须在命令行中写:

android avd

然后弹出一个菜单,你必须创建自己的avd,然后启动

然后你需要打开一个新终端(ctrl+alt+t)。 Cd 到您应用的正确路径。

现在 ionic emulate android 应该可以工作了。

关于使用 'ionic emulate android' 命令时 Android 模拟器不安装应用程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36316820/

相关文章:

Android模拟器在启动时卡住

android - Cordova 可以共享屏幕吗?

android - 工具栏后退按钮功能

Android - 从另一个应用程序启动和终止一个应用程序

java - 是否可以有一个 Eclipse 项目,其中一个包作为 Android 应用程序执行,第二个包作为 Java SE 应用程序执行?

ios - 在 iOS WebView 中获取启动控制台日志

javascript - 如何检查 Cordova 应用程序是否在 12(AM/PM)或 24 小时环境中运行

MySQL Ubuntu 19.10 安装错误 - 系统架构目录不存在

android - 任务 ':app:transformClassesWithDesugarForRelease' 的 ionic 执行失败

ubuntu - HTTP 状态 500 - 无法创建目录/var/lib/tomcat7/webapps/ROOT/WEB-INF/lucee