运行$ Cordova平台时出错,添加Android错误如下所示。和 更改科尔多瓦安卓版本会影响到其他已安装的插件。
为 android 安装 "cordova-plugin-compat" 插件不支持此项目的 cordova-android 版本。科尔多瓦-安卓:7.0.0,失败版本要求:<6.3.0 跳过 android 的 'cordova-plugin-compat' 为安卓安装"cordova-plugin-splashscreen" 无法安装"cordova-plugin-splashscreen":错误:ENOENT:没有这样的文件或目录,打开"/home/sarath/Desktop/My_Files/Bravo_codes/Projects/omasouq-app/omasouq-app/platforms/android/AndroidManifest.xml" at Object.fs.openSync (fs.js:646:18( at Object.fs.readFileSync (fs.js:551:33( at Object.parseElementtreeSync (/home/sarath/Desktop/My_Files/Bravo_codes/Projects/omasouq-app/omasouq-app/platforms/android/cordova/node_modules/cordova-common/src/util/xml-helpers.js:180:27( at new AndroidManifest (/home/sarath/Desktop/My_Files/Bravo_codes/Projects/omasouq-app/omasouq-app/platforms/android/cordova/lib/AndroidManifest.js:29:20( at AndroidProject.getPackageName (/home/sarath/Desktop/My_Files/Bravo_codes/Projects/omasouq-app/omasouq-app/platforms/android/cordova/lib/AndroidProject.js:99:12( at Api.addPlugin (/home/sarath/Desktop/My_Files/Bravo_codes/Projects/omasouq-app/omasouq-app/platforms/android/cordova/Api.js:223:57( at handleInstall (/home/sarath/.nvm/versions/node/v8.11.2/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/install.js:594:10( at/home/sarath/.nvm/versions/node/v8.11.2/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/install.js:357:28 at _fulfilled (/home/sarath/.nvm/versions/node/v8.11.2/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/q/q.js:787:54( at self.promiseDispatch.done (/home/sarath/.nvm/versions/node/v8.11.2/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/q/q.js:816:30(
您必须先升级安装插件,然后再升级 cordova 平台。
或
您可以先删除所有插件,然后升级您的科尔多瓦安卓版本,然后再次重新安装所有插件。
升级科尔多瓦平台ionic cordova add platform android@6.4.0