我已经安装了 Visual Studio 扩展多设备混合,一切都很好,除非我运行一个启用了任何 Cordova 插件的新项目,例如电池状态。我收到以下错误消息。但是,如果我删除或禁用了所有插件,它就可以正常工作。有没有人知道下面的错误转储或以前遇到过同样的问题?谢谢。
错误信息
无法获取 org.apache.cordova.battery-status C:\Mobile\CordovaApp\CordovaApp\EXEC 1 1 CordovaApp 的包信息
Visual Studio 输出
------ Adding plugin: org.apache.cordova.battery-status
1> Calling plugman.fetch on plugin "org.apache.cordova.battery-status"
1>
1> C:\Users\myuser\AppData\Roaming\npm\node_modules\vs-mda\node_modules\q\q.js:126
1> throw e;
1> ^
1>EXEC : error : Failed to fetch package information for org.apache.cordova.battery-status
1> at C:\Users\myuser\AppData\Roaming\npm\node_modules\vs-mda\node_modules\cordova\node_modules\cordova-lib\src\plugman\registry\registry.js:32:20
1> at Request.cb [as _callback] (C:\Users\myuser\AppData\Roaming\npm\node_modules\vs-mda\node_modules\cordova\node_modules\cordova-lib\src\plugman\registry\registry.js:251:9)
1> at self.callback (C:\Users\myuser\AppData\Roaming\npm\node_modules\vs-mda\node_modules\cordova\node_modules\cordova-lib\node_modules\request\index.js:148:22)
1> at Request.emit (events.js:117:20)
1> at ClientRequest.self.clientErrorHandler (C:\Users\myuser\AppData\Roaming\npm\node_modules\vs-mda\node_modules\cordova\node_modules\cordova-lib\node_modules\request\index.js:257:10)
1> at ClientRequest.emit (events.js:95:17)
1> at Socket.socketErrorListener (http.js:1551:9)
1> at Socket.emit (events.js:95:17)
1> at net.js:440:14
1> at process._tickCallback (node.js:419:13)
1>C:\Users\myuser\AppData\Roaming\npm\node_modules\vs-mda-targets\Microsoft.MDA.targets(99,5): error MSB3073: The command ""C:\Users\myuser\AppData\Roaming\npm\node_modules\vs-mda\vs-cli" build --platform "Android" --configuration "Debug" --projectDir . --projectName "CordovaApp" --language "en-US" --buildServerUrl "" --buildTarget "AndroidEmulator"" exited with code 8.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========