0
可誰能告訴我如何通過一個命令操作系統windows刪除科爾多瓦應用程序的所有插件10如何從Cordova中刪除所有插件?
可誰能告訴我如何通過一個命令操作系統windows刪除科爾多瓦應用程序的所有插件10如何從Cordova中刪除所有插件?
我會嘗試利用一個科爾多瓦鉤子腳本的是這樣的:
#!/usr/bin/env node
//this hook removes all your plugins
// add your plugins to this list--either
// the identifier, the filesystem location
// or the URL
var pluginlist = [
"org.apache.cordova.device",
"org.apache.cordova.device-motion",
"org.apache.cordova.device-orientation",
"org.apache.cordova.geolocation",
"https://github.com/chrisekelley/AppPreferences/"
];
var fs = require('fs');
var path = require('path');
var sys = require('sys')
var exec = require('child_process').exec;
function puts(error, stdout, stderr) {
sys.puts(stdout)
}
pluginlist.forEach(function(plug) {
exec("cordova plugin rm " + plug, puts);
});
從@devgirlFL blog兩者。
謝謝,我會嘗試 – Souras
需要哪種場景?你可以用'cordova plugins'列出所有插件,然後使用'cordova plugin rm cordova-plugin-1 cordova-plugin-2 ...'將其全部刪除。或者使用'cd .. && cordova create anotherApp --template = firstApp'創建另一個基於資產的應用程序(如果您沒有將''save''保存到'config.xml'中的插件),則後者將工作。 – daserge
我在我的應用程序中有12個插件。我在2天前更新了Android SDK,並在構建應用程序中引發了該問題。也許其中之一是造成問題。所以我想重新安裝所有這些。 – Souras
然後,您應該逐個刪除它們,並檢查它是否修復了構建。 – daserge