无法安装cordova插件。

4
我正在尝试将插件添加到我的应用程序中,但在 CLI 中遇到以下错误和堆栈跟踪:
cordova plugin add https://github.com/RootDev-EG/PushNotification.git
<pre>
/usr/local/lib/node_modules/ionic/node_modules/ionic-app-lib/lib/state.js:543
        throw 'Error executing "' + pluginCommand + '":\n' + output;
        ^
Error executing "cordova plugin add https://github.com/RootDev-EG/PushNotification.git ":
Fetching plugin "https://github.com/RootDev-EG/PushNotification.git" via git clone
Repository "https://github.com/RootDev-EG/PushNotification.git" checked out to git ref "master".
Installing "com.phonegap.plugins.PushPlugin" for android
Notice: org.apache.cordova.device has been automatically converted to cordova-plugin-device and fetched from npm. This is due to our old plugins registry shutting down.
Dependent plugin "cordova-plugin-device" already installed on android.
Notice: org.apache.cordova.globalization has been automatically converted to cordova-plugin-globalization and fetched from npm. This is due to our old plugins registry shutting down.
Fetching plugin "cordova-plugin-globalization" via npm
Installing "cordova-plugin-globalization" for android
Notice: com.google.playservices has been automatically converted to cordova-plugin-googleplayservices and fetched from npm. This is due to our old plugins registry shutting down.
Fetching plugin "https://github.com/MobileChromeApps/google-play-services.git" via git clone
Repository "https://github.com/MobileChromeApps/google-play-services.git" checked out to git ref "master".
Failed to install 'com.phonegap.plugins.PushPlugin':Error: Expected plugin to have ID "cordova-plugin-googleplayservices" but got "com.google.playservices".
    at checkID (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/fetch.js:181:15)
    at /usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/fetch.js:166:9
    at _fulfilled (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:787:54)
    at self.promiseDispatch.done (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:816:30)
    at Promise.promise.promiseDispatch (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/cordova-common/node_modules/q/q.js:796:13)
    at /usr/local/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/cordova-common/node_modules/q/q.js:604:44
    at runSingle (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/cordova-common/node_modules/q/q.js:137:13)
    at flush (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/cordova-common/node_modules/q/q.js:125:13)
    at doNTCallback0 (node.js:419:9)
    at process._tickCallback (node.js:348:13)
Error: Expected plugin to have ID "cordova-plugin-googleplayservices" but got "com.google.playservices".


</pre>

感谢您提前提供任何帮助。
谢谢!
1个回答

0

谢谢您的回复,但仍然无法解决问题,我现在正在尝试本地添加并手动修复依赖关系。 - mazzica1

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接