微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

android – 构建错误cordova应用程序,“错误:404未找到:cordova-plugin-file”

我正在尝试构建我的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”:”document not found”}

有没有办法报告问题?

解决方法:

使用org.apache.cordova.file直到另行通知.这仍然是插件注册表中使用的id:http://plugins.cordova.io/#/package/org.apache.cordova.file
新的插件ID在dev分支上并且未发布.如果您现在需要实际安装开发版,请执行以下操作:

cordova插件添加https://github.com/apache/cordova-plugin-file.git

资料来源:https://issues.apache.org/jira/browse/CB-8806

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐