为什么在我运行此命令 phonegap run android
后我的 www/index.html 不断重置(默认 phonegap)?而这个 cordova emulate android
做同样的事情,但为什么它与第一个命令不同,再加上给我这个错误:
编辑:我正在使用 IntelliJ IDE。
BUILD SUCCESSFUL Total time: 14 seconds WARNING : no emulator specified, defaulting to api18 Waiting for emulator... shell.js: internal error Error: spawn EMFILE at errnoException (child_process.js:980:11) at ChildProcess.spawn (child_process.js:927:11) at exports.spawn (child_process.js:715:9) at Object.exports.execFile (child_process.js:607:15) at Object.exports.exec (child_process.js:578:18) at execSync (/Users/fernando/hello/platforms/android/cordova/node_modules/shelljs/shell.js:1793:9) at Object._exec (/Users/fernando/hello/platforms/android/cordova/node_modules/shelljs/shell.js:1130:12) at Object.exec (/Users/fernando/hello/platforms/android/cordova/node_modules/shelljs/shell.js:1487:23) at Object.module.exports.sleep (/Users/fernando/hello/platforms/android/cordova/lib/emulator.js:255:15) at Object.module.exports.wait_for_emulator (/Users/fernando/hello/platforms/android/cordova/lib/emulator.js:221:14) ]
最佳答案
您需要更改 [app_path]\www 中的代码,而不是平台目录中的代码
关于android - Phonegap Index.html 重置每次启动,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19715746/