简体   繁体   English

Phonegap无法将示例应用程序安装到android模拟器上

[英]Phonegap failed to install sample app onto android emulator

I've been trying to install a helloworld app onto android 4.3 emulator with the command "phonegap run android". 我一直在尝试使用命令“ phonegap run android”将helloworld应用安装到android 4.3模拟器上。 It was built successfully. 它已成功构建。 I believe the error occurred during the installation. 我相信安装过程中发生了错误。 I've been trying to fix it for hours with no luck. 我一直在努力修复它,运气不好。 Any ideas? 有任何想法吗? Thanks in advance. 提前致谢。

PS: I'm using Mac. PS:我正在使用Mac。 The OS version is 10.7.5. 操作系统版本为10.7.5。

Below is the error: 下面是错误:

BUILD SUCCESSFUL
Total time: 15 seconds
WARNING : no emulator specified, defaulting to myavd
Waiting for emulator...
shell.js: internal error
Error: spawn EMFILE
    at errnoException (child_process.js:977:11)
    at ChildProcess.spawn (child_process.js:924:11)
    at exports.spawn (child_process.js:712:9)
    at Object.exports.execFile (child_process.js:604:15)
    at Object.exports.exec (child_process.js:575:18)
    at execSync (/Users/xxxxxx/Documents/myapp/platforms/android/cordova/node_modules/shelljs/shell.js:1793:9)
    at Object._exec (/Users/xxxxxx/Documents/myapp/platforms/android/cordova/node_modules/shelljs/shell.js:1130:12)
    at Object.exec (/Users/xxxxxx/Documents/myapp/platforms/android/cordova/node_modules/shelljs/shell.js:1487:23)
    at Object.module.exports.sleep (/Users/xxxxxx/Documents/myapp/platforms/android/cordova/lib/emulator.js:255:15)
    at Object.module.exports.wait_for_emulator (/Users/xxxxxx/Documents/myapp/platforms/android/cordova/lib/emulator.js:221:14)

EMFILE is error when you try to open more file descriptors than your system supports. 当您尝试打开比系统支持更多的文件描述符时,EMFILE错误。 File descriptor is an indicator for accessing a file. 文件描述符是用于访问文件的指示器。 Generally the limit is 256 on OSX. 通常在OSX上限制为256。 The easiest solution is to increase the limit by doing ulimit -n 10480 . 最简单的解决方案是通过执行ulimit -n 10480来增加限制。 But this solution would only be for your current session of terminal. 但是此解决方案仅适用于您当前的终端会话。 The permanent approach would to put this into your shell profile ~/.bashrc or ~/.zshrc , but it is not the recommended approach as it might cause some system issues. 永久性的方法是将其放入您的Shell配置文件~/.bashrc~/.zshrc ,但是不建议使用此方法,因为它可能会导致某些系统问题。

You can search more on this issue on google 您可以在Google上搜索有关此问题的更多信息

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

相关问题 Phonegap run android命令挂起,尝试将应用程序安装到设备上 - Phonegap run android command hangs on trying to install app onto device 在 React Native 的 android 模拟器中安装应用程序失败 - Failed to install the app in android emulator in React Native Phonegap构建将应用程序安装到模拟器失败 - Phonegap build installing app onto emulator failing Android:无法将发布版本安装到模拟器上; 获取失败 [INSTALL_PARSE_FAILED_UNEXPECTED_EXCEPTION] - Android: Unable to install release build onto emulator; getting Failure [INSTALL_PARSE_FAILED_UNEXPECTED_EXCEPTION] 尝试使用phonegap将android应用程序运行到模拟器上时出错,我该如何解决? - Error trying to run android app onto emulator with phonegap, how can I fix it? Phonegrap停滞在“试图将应用程序安装到模拟器上” - Phonegrap stalling on “trying to install app onto emulator” PhoneGap App未在Android Emulator中运行 - PhoneGap App not running in Android Emulator 反应原生 android 模拟器错误:无法安装应用程序 - react native android emulator error: Failed to install the app 无法在Android模拟器上安装ApiDemos示例项目 - Cannot install ApiDemos sample project on Android emulator 示例应用程序的视频未在Android TV仿真器中运行 - Videos of the Sample App Not Running in the Android TV Emulator
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM