使用plugman的Cordova插件安装失败

时间:2016-08-11 21:11:28

标签: cordova phonegap-plugins cordova-plugins plugman

按照phonegap教程[1],我试图安装一个cordova插件(使用最新的 plugman v1.3.0 [2])。它失败并出现以下错误:

C:\Android-dev\cordova-android\bin\HybridAndroidApp>plugman install --platform android --project . --plugin nl.x-services.plugins.toast
Notice: nl.x-services.plugins.toast has been automatically converted to cordova-plugin-x-toast and fetched from npm. This is due to our old plugins registry shutting down.
Fetching plugin "cordova-plugin-x-toast" via npm
Installing "cordova-plugin-x-toast" for android
Failed to install 'cordova-plugin-x-toast':TypeError: pluginInfo.getEditConfigs is not a function
    at PlatformMunger.add_plugin_changes (C:\Android-dev\cordova-android\bin\HybridAndroidApp\cordova\node_modules\cordova-common\src\ConfigChanges\ConfigChanges.js:134:42)
    at C:\Android-dev\cordova-android\bin\HybridAndroidApp\cordova\node_modules\cordova-common\src\PluginManager.js:126:25
    at _fulfilled (C:\Android-dev\cordova-android\bin\HybridAndroidApp\cordova\node_modules\q\q.js:834:54)
    at self.promiseDispatch.done (C:\Android-dev\cordova-android\bin\HybridAndroidApp\cordova\node_modules\q\q.js:863:30)
    at Promise.promise.promiseDispatch (C:\Android-dev\cordova-android\bin\HybridAndroidApp\cordova\node_modules\q\q.js:796:13)
    at C:\Android-dev\cordova-android\bin\HybridAndroidApp\cordova\node_modules\q\q.js:857:14
    at runSingle (C:\Android-dev\cordova-android\bin\HybridAndroidApp\cordova\node_modules\q\q.js:137:13)
    at flush (C:\Android-dev\cordova-android\bin\HybridAndroidApp\cordova\node_modules\q\q.js:125:13)
    at nextTickCallbackWith0Args (node.js:420:9)
    at process._tickCallback (node.js:349:13)
pluginInfo.getEditConfigs is not a function

我发现cordova-lib最近有一个问题: https://www.mail-archive.com/issues@cordova.apache.org/msg70264.html

我刚刚使用npm安装了plugman。我失去了如何继续使用固定插件(如果它已修复)。我很感激你的帮助。

谢谢!

[1] http://docs.phonegap.com/tutorials/develop/1-embed-webview/android/

[2] https://github.com/apache/cordova-plugman

1 个答案:

答案 0 :(得分:0)

如果有人仍然遇到此错误,请尝试以下

# plugman install --platform android --project . --plugin cordova-plugin-x-toast

有关此插件的更多信息,您可以找到here