Cordova / PhoneGap添加插件失败

时间:2014-04-30 09:36:09

标签: cordova plugins

当我尝试为Android平台添加插件时,它会抛出以下错误,不确定错误,之前添加的插件工作正常..

将cordova更新为3.4.0后也尝试了

错误:无法获取org.apache.cordova.file的包信息

> cordova plugin add org.apache.cordova.file
Fetching plugin "org.apache.cordova.file" via plugin registry
**Error: Failed to fetch package information for org.apache.cordova.file**
    at C:\Users\hank\AppData\Roaming\npm\node_modules\cordova\node_modules\plugman\src
\registry\registry.js:32:20
    at Request.cb [as _callback] (C:\Users\hank\AppData\Roaming\npm\node_modules\cordo
va\node_modules\plugman\src\registry\registry.js:251:9)
    at self.callback (C:\Users\hank\AppData\Roaming\npm\node_modules\cordova\node_modu
les\plugman\node_modules\request\index.js:148:22)
    at Request.EventEmitter.emit (events.js:117:20)
    at ClientRequest.self.clientErrorHandler (C:\Users\hank\AppData\Roaming\npm\node_m
odules\cordova\node_modules\plugman\node_modules\request\index.js:257:10)
    at ClientRequest.EventEmitter.emit (events.js:95:17)
    at Socket.socketErrorListener (http.js:1547:9)
    at Socket.EventEmitter.emit (events.js:95:17)
    at net.js:441:14
    at process._tickCallback (node.js:415:13)

1 个答案:

答案 0 :(得分:1)

你试过了吗?

cordova add https://git-wip-us.apache.org/repos/asf/cordova-plugin-file.git

如果这不起作用,请尝试删除插件文件夹的内容并再次运行上述命令。