【问题标题】:Error trying to run android app onto emulator with phonegap, how can I fix it?尝试使用phonegap在模拟器上运行android应用程序时出错,我该如何解决?
【发布时间】:2013-10-18 06:33:01
【问题描述】:

我在 Ubuntu 12.04 上安装了 phonegap 3.0.0-0.14.3。

我想用安卓模拟器运行应用程序。当我运行phonegap run android 时,我得到以下信息:

[phonegap] compiling Android...
[phonegap] successfully compiled Android app
[phonegap] trying to install app onto device
[phonegap] no device was found
[phonegap] trying to install app onto emulator
   [error] An error occurred while emulating/deploying the android project.Warning : [ --debug | --release | --nobuild ] not specified, defaulting to --debug
Cleaning project...

应用程序在设备上运行没有问题。

请帮忙!

【问题讨论】:

  • 模拟器正在运行?

标签: android ubuntu cordova android-emulator


【解决方案1】:

我终于找到了我的问题的答案。

我收到此错误是因为我没有创建 Android 虚拟设备。创建一个后,一切正常。

在命令提示符下键入:android avd 以显示 de AVD Manager 窗口,然后您可以创建一个 android 虚拟设备。

我希望这对某人有帮助。

【讨论】:

  • 感谢您的回答!这解决了我的问题!
【解决方案2】:

在新版本中,adb 被移动到我的环境中的新文件夹中 D:\Android\android-sdk\platform-tools.所以你需要在路径中包含这个新位置。

【讨论】:

    【解决方案3】:

    我在 MacOSX 上使用 Cordova。 您应该尝试以下方法:

    sudo android create avd --name myCordova --target 1 --abi default/armeabi-v7a --force 
    

    代替:

    android create avd --name myCordova --target 1 --abi default/armeabi-v7a --force
    

    对我有用

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2012-10-17
      • 1970-01-01
      • 2016-09-04
      • 2021-07-09
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多