gpt4 book ai didi

cordova - 为什么phonegap无法运行wp8模拟器?

转载 作者:行者123 更新时间:2023-12-02 10:44:27 25 4
gpt4 key购买 nike

我使用的是phonegap 3.7,我正在尝试通过以下方式启动模拟器:

phonegap run wp8

但是如果失败:

Error: Invalid target device specified.

[..]

ERROR: Error code -2147024809 for command: C:\Program Files (x86)\Microsoft SDKs \Windows Phone\v8.0\Tools\Xap Deployment\XapDeployCmd.exe with args: /installlau nch,C:/Users/kitsunde/Development/pub_pure_app/src/platforms/wp8/Bin/debug/Cordo vaAppProj_Debug_AnyCPU.xap,/targetdevice:xd

Error: C:\Users\kitsunde\Development\pub_pure_app\src\platforms\wp8\cordova\run. bat: Command failed with exit code 2 at ChildProcess.whenDone (C:\Users\kitsunde\AppData\Roaming\npm\node_modules \phonegap\node_modules\cordova\node_modules\cordova-lib\src\cordova\superspawn.j s:135:23) at ChildProcess.emit (events.js:98:17) at maybeClose (child_process.js:766:16) at Process.ChildProcess._handle.onexit (child_process.js:833:5)

可能是什么原因造成的?

最佳答案

从 Cordova/PhoneGap 3.6 开始,如果您尝试模拟 Windows Phone 8.1,则必须使用 Cordova/PhoneGap 中的 windows 平台,而不是 wp8 平台.

phonegap platforms rm wp8
phonegap platforms add windows

The Apache Cordova 3.6 release has been inspired by the idea of Building universal Windows apps. It introduces a new unified ‘windows’ platform to build apps targeting Windows 8.0, Windows 8.1 and Windows Phone 8.1. Note, Windows Phone 8.0 still remains as a separate ‘wp8’ platform due to different implementation.

来自:http://akvelon.com/apache-cordova-adds-windows-8-1-and-windows-phone-8-1-universal-apps-support/

明白了吗?

  • Windows 8 > 使用 Windows 平台
  • Windows 8.1 > 使用 Windows 平台
  • Windows Phone 8 > 使用 wp8 平台
  • Windows Phone 8.1 > 使用 windows 平台

如果您确实只想模拟 Windows Phone 8,则可能需要安装 Windows Phone 8 sdk(如果尚未安装)。

关于cordova - 为什么phonegap无法运行wp8模拟器?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28040611/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com