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
标签:android,cordova,cordova-plugins,http-status-code-404 来源: https://codeday.me/bug/20190824/1710893.html