无法安装cordova插件

时间:2015-11-24 05:17:29

标签: cordova plugins

我正在尝试添加插件     

    cordova plugin add https://github.com/RootDev-EG/PushNotification.git 
    
到我的应用程序,但从cli:

获得堆栈跟踪的以下错误
<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 :(得分:0)

答案在此插件https://github.com/MobileChromeApps/google-play-services的自述文件中,该插件是您尝试使用的插件的依赖项。

您可以在此主题中找到其他人寻找解决方法:https://github.com/Telerik-Verified-Plugins/PushNotification/issues/64