0

我在嘗試在我現有的應用程序中添加cordova wkwebview插件時出現了一些奇怪的錯誤。無法安裝'cordova-plugin-wkwebview-engine':CordovaError:找不到-Info.plist文件或config.xml文件

錯誤:如果我嘗試更新IOS科爾多瓦平臺

///////////////// admins-mbp:WKWebView admin$ cordova platform update ios Updating ios project... Error: Uncaught, unspecified "error" event. (updatePlatform is not callable from the iOS project API, you will need to do this manually.) /////////////////////////////////////////////////////////////

錯誤:如果我嘗試從CLI運行科爾多瓦項目

////////////////// admins-mbp:WKWebView admin$ cordova run Error: could not find -Info.plist file, or config.xml file. /////////////////////////////////////////////////////////////

錯誤:如果我嘗試添加科爾多瓦插件WKWebview

/////////////// admins-mbp:WKWebView admin$ cordova platform update ios Updating ios project... Error: Uncaught, unspecified "error" event. (updatePlatform is not callable from the iOS project API, you will need to do this manually.) admins-mbp:WKWebView admin$ cordova plugin add cordova-plugin-wkwebview-engine Fetching plugin "cordova-plugin-wkwebview-engine" via npm Installing "cordova-plugin-wkwebview-engine" for ios Failed to install 'cordova-plugin-wkwebview-engine':CordovaError: could not find -Info.plist file, or config.xml file. at Object.parseProjectFile [as parse] (/Users/Tanuj/World Bank/CVS CodeBase/WKWebView/WKWebView/platforms/ios/cordova/lib/projectFile.js:50:15) at Plugman.addPlugin (/Users/Tanuj/World Bank/CVS CodeBase/WKWebView/WKWebView/platforms/ios/cordova/lib/plugman/Plugman.js:69:31) at Api.addPlugin (/Users/Tanuj/World Bank/CVS CodeBase/WKWebView/WKWebView/platforms/ios/cordova/Api.js:187:53) at handleInstall (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/install.js:611:6) at /usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/install.js:407:28 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/q/q.js:749:13) at /usr/local/lib/node_modules/cordova/node_modules/q/q.js:509:49 at flush (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:108:17) Error: could not find -Info.plist file, or config.xml file. admins-mbp:WKWebView admin$ /////////////////////////////////////////////////////////////

我是新來的這個科爾多瓦平臺,所以我不知道這是什麼樣的錯誤,當我在新項目中嘗試同樣的插件;它增加了這個插件。

我認爲這是一些科爾多瓦版本的問題。請幫助我,因爲我堅持這一點,沒有辦法前進。

+0

我想我們可以解決這個問題,如果我們可以更新cordova iOS平臺。正如我嘗試與新的科爾多瓦項目一樣;並在新項目中成功添加了該插件。我們可以通過1.刪除當前的ios平臺...這也將刪除我的項目文件..我不想要的。 2.更新ios平臺..這是給我未知的錯誤。 – Tanuj

回答

1

我有類似的錯誤,並找到了解決辦法here

基本上,我已經將離子這個問題。但無所謂你可以使用這個解決方案。

  1. cordova platform remove ios
  2. cordova platform list爲是肯定的,那IOS平臺刪除
  3. cordova platform add ios --save

而且它。

如果任何人在android上有相同的錯誤,您只能用android替換ios

希望它有幫助。

相關問題