我正在尝试构建我的cordova应用程序,但是从2015年4月3日开始,building给了我这个错误:
Installing "cordova-plugin-media-capture" for android
Running command: C:\wamp\www\HTML5Application\platforms\android\cordova\version.bat
Command finished with error code 0: C:\wamp\www\HTML5Application\platforms\android\cordova\version.bat
Dependencies detected, iterating through them...
Dependent plugin "cordova-plugin-file" not fetched, retrieving then installing.
Fetching plugin "cordova-plugin-file" via plugin registry
npm http GET http://registry.cordova.io/cordova-plugin-file
npm http 404 http://registry.cordova.io/cordova-plugin-file
Failed to install 'cordova-plugin-media-capture':Error: 404 Not Found: cordova-plugin-file
at RegClient.<anonymous> (C:\Users\antoniof\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\node_modules\npm\node_modules\npm-registry-client\lib\request.js:268:14)
at Request.self.callback (C:\Users\antoniof\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\node_modules\npm\node_modules\request\index.js:148:22)
at Request.emit (events.js:110:17)
at Request.<anonymous> (C:\Users\antoniof\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\node_modules\npm\node_modules\request\index.js:876:14)
at Request.emit (events.js:129:20)
at IncomingMessage.<anonymous> (C:\Users\antoniof\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\node_modules\npm\node_modules\request\index.js:827:12)
at IncomingMessage.emit (events.js:129:20)
at _stream_readable.js:908:16
at process._tickCallback (node.js:355:11)
Error: 404 Not Found: cordova-plugin-file
at RegClient.<anonymous> (C:\Users\antoniof\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\node_modules\npm\node_modules\npm-registry-client\lib\request.js:268:14)
at Request.self.callback (C:\Users\antoniof\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\node_modules\npm\node_modules\request\index.js:148:22)
at Request.emit (events.js:110:17)
at Request.<anonymous> (C:\Users\antoniof\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\node_modules\npm\node_modules\request\index.js:876:14)
at Request.emit (events.js:129:20)
at IncomingMessage.<anonymous> (C:\Users\antoniof\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\node_modules\npm\node_modules\request\index.js:827:12)
at IncomingMessage.emit (events.js:129:20)
at _stream_readable.js:908:16
at process._tickCallback (node.js:355:11)
C:\wamp\www\HTML5Application\nbproject\build.xml:235: exec returned: 1
BUILD FAILED (total time: 48 seconds)
似乎错误不依赖于我,因为cmd http://registry.cordova.io/cordova-plugin-file返回
{“error”:“not_found”,“reason”:“找不到文档”}
有没有办法报告问题?
答案 0 :(得分:4)
使用org.apache.cordova.file
,直至另行通知。这仍然是插件注册表中使用的id:http://plugins.cordova.io/#/package/org.apache.cordova.file
新的插件ID在dev分支上并且未发布。如果您现在需要实际安装开发版,请执行以下操作:
cordova plugin add https://github.com/apache/cordova-plugin-file.git
答案 1 :(得分:2)
尝试在控制台中手动安装插件:
cordova plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-file.git
请注意,您必须位于项目的基本目录中。