只要我运行命令 cordova add platform 或 ionic cordova插件添加https://github.com/moust/cordova-plugin-videoplayer.git ,我就会收到以下错误。
**(node:5072) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejec
tion id: 1): CordovaError: Cordova does not know add; try `cordova help` for a l
ist of all the available commands.
(node:5072) [DEP0018] DeprecationWarning: Unhandled promise rejections are depre
cated. In the future, promise rejections that are not handled will terminate the
Node.js process with a non-zero exit code.**
我试过降解cordova但它没有用。我该如何解决这个问题?
编辑: cordova平台添加android 给了我错误:
Using cordova-fetch for cordova-android@~7.0.0
(node:3444) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejec
tion id: 1): CordovaError: Failed to fetch platform cordova-android@~7.0.0
Probably this is either a connection problem, or platform spec is incorrect.
Check your connection and platform name/version/URL.
Error: cmd: Command failed with exit code ENOENT
(node:3444) [DEP0018] DeprecationWarning: Unhandled promise rejections are depre
cated. In the future, promise rejections that are not handled will terminate the
Node.js process with a non-zero exit code.
答案 0 :(得分:0)
您输入的命令行错误。命令行是
$ ionic cordova platform add android
或
$ cordova platform add android
答案 1 :(得分:0)
使用
$ cordova platform add android