簡體   English   中英

無法安裝cordova插件

[英]cannot install cordova plugin

我想添加插件

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> 

提前感謝您的幫助

答案是在這個插件的自述文件https://github.com/MobileChromeApps/google-play-services中 ,這是您嘗試使用的插件的依賴項。

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

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM