Cordova / PhoneGap无法添加WP7 / WP8 / Windows平台 [英] Cordova/PhoneGap cannot add WP7/WP8/Windows platform
问题描述
尝试在我的Win8上添加wp8平台时出现错误,请参阅下面的详细信息:
〜\CordovaWP8> cordova -d平台添加wp8
cordova库wp8已经存在。无需下载。继续。
检查平台wp8是否通过最低要求...
检查wp8要求...
运行〜.cordova\lib\wp\cordova\3.1.0 \wp8 \bin \check_reqs(输出跟随)
创建wp8项目...
运行bin / create for platformwp8使用命令:〜.cordova\lib\wp\cordova\3.1.0\bin\rereate
〜\CordovaWP8\platforms\wp8〜\\\
amespace CordovaWP8(输出结果如下)
错误:wp8子项目创建时出错。
系统找不到指定的路径。
在〜\AppData\Roaming\\\
pre>
pm\\\
ode_modules \cordova\src\platform.js:246:30
在ChildProcess.exithandler(child_process.js:641:7)
在ChildProcess.EventEmitter.emit(events.js:98:17 )
at maybe.Close(child_process.js:735:16)
at Process.ChildProcess._handle.onexit(child_process.js:802:5)
但是我添加了一个Android平台,任何想法?
解决方案p>似乎是已知问题,请参阅说明和修正
https://issues.apache.org/jira/browse/CB-5183
解决方案1。安装prev working version
npm uninstall -g cordova
npm install -g cordova@3.1.0 -0.1.0
Solution2。 以下说明应该有效。
- 导航到cordova安装文件夹
- 替换以下文件
〜\AppData\Roaming\\\
pm\\\
ode_modules\cordova\
c:\ Users\Sergei\AppData\Roaming\\\
pm\\\
ode_modules\cordova
src / metadata / wp8_parser.js与https://github.com/sgrebnov/cordova-cli/blob/181aa1b7e8f3c8b2f7c4db12e1f79d64c26e8b42/src/metadata/wp8_parser.js
src / platform.js与 https://github.com/sgrebnov/cordova- cli / blob / 181aa1b7e8f3c8b2f7c4db12e1f79d64c26e8b42 / src / platform.js
I got an error while trying to add a wp8 platform on my Win8, see detail as bellow,
~\CordovaWP8>cordova -d platforms add wp8 cordova library for "wp8" already exists. No need to download. Continuing. Checking if platform "wp8" passes minimum requirements... Checking wp8 requirements... Running ""~.cordova\lib\wp\cordova\3.1.0\wp8\bin\check_reqs"" (output to follow)
Creating wp8 project... Running bin/create for platform "wp8" with command: ""~.cordova\lib\wp\cordova\3.1.0\bin\create" "~\CordovaWP8\platforms\wp8" "~\namespace" "CordovaWP8"" (output to follow)
Error: An error occured during creation of wp8 sub-project. The system cannot find the path specified.
at ~\AppData\Roaming\npm\node_modules\cordova\src\platform.js:246:30
at ChildProcess.exithandler (child_process.js:641:7)
at ChildProcess.EventEmitter.emit (events.js:98:17)
at maybeClose (child_process.js:735:16)
at Process.ChildProcess._handle.onexit (child_process.js:802:5)
But I added an android platform successfully, any ideas?
Seems to be a known issue, please see description and fix
https://issues.apache.org/jira/browse/CB-5183
Solution1. Install prev working version
npm uninstall -g cordova
npm install -g cordova@3.1.0-0.1.0
Solution2. Fix current version. The following instructions should work
- Navigate to cordova installation folder
~\AppData\Roaming\npm\node_modules\cordova\
c:\Users\Sergei\AppData\Roaming\npm\node_modules\cordova
- Replace the following files
src/metadata/wp8_parser.js with https://github.com/sgrebnov/cordova-cli/blob/181aa1b7e8f3c8b2f7c4db12e1f79d64c26e8b42/src/metadata/wp8_parser.js
src/platform.js with https://github.com/sgrebnov/cordova-cli/blob/181aa1b7e8f3c8b2f7c4db12e1f79d64c26e8b42/src/platform.js
这篇关于Cordova / PhoneGap无法添加WP7 / WP8 / Windows平台的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!