gpt4 book ai didi

javascript - Apache Cordova 无法加载插件

转载 作者:行者123 更新时间:2023-11-30 17:32:11 25 4
gpt4 key购买 nike

我正在尝试使用 apache cordova 创建一个应用程序,我很难安装它。最后,当一切正常时,我尝试使用此命令添加一个插件:

C:\hello>cordova plugin add org.apache.cordova.console

然后出现此消息:

Fetching plugin "org.apache.cordova.console" via plugin registry

一段时间后出现错误:

Error: Failed to fetch package information for org.apache.cordova.console
at C:\Users\pc\AppData\Roaming\npm\node_modules\cordova\node_modules\plugman
\src\registry\registry.js:32:20
at Request.cb [as _callback] (C:\Users\pc\AppData\Roaming\npm\node_modules\c
ordova\node_modules\plugman\src\registry\registry.js:251:9)
at self.callback (C:\Users\pc\AppData\Roaming\npm\node_modules\cordova\node_
modules\plugman\node_modules\request\index.js:148:22)
at Request.EventEmitter.emit (events.js:117:20)
at ClientRequest.self.clientErrorHandler (C:\Users\pc\AppData\Roaming\npm\no
de_modules\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:440:14
at process._tickCallback (node.js:415:13)

最佳答案

另一种简单的方法是

  1. 从 git 下载 zip 插件
  2. 将zip解压到某个路径
  3. 运行 cordova plugin add cordova-plugin-splashscreen-master(将“cordova-plugin-splashscreen-master”替换为您的文件夹名称)

关于javascript - Apache Cordova 无法加载插件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22787367/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com