Initially i was using node version 4.5.0 cordova 6.0 and ionic version 1.7.2 to build the app. now have upgraded all the tools (node version 8.11.3, cordova version 8.0.0 and ionic version 3.20.0) for upgrading the android api level. i removed android platform using cordova platform remove android
and when i try to add android platform using command cordova platform add android
it automatically adds version android 7.0.0
. when i try cordova platform add [email protected]
it gives me the error. I have installed android Sdk version 26. but i am not able to upgrade the api level. please help.
the error i am getting when try to upgrade 8.0.0 is
$ cordova platform add [email protected] Running command: /home/ubuntu/git/webrino/webrino-ionic/hooks/before_platform_add/init_directories.js /home/ubuntu/git/webrino/webrino-ionic Using cordova-fetch for [email protected] (node:20325) UnhandledPromiseRejectionWarning: CordovaError: Failed to fetch platform [email protected] Probably this is either a connection problem, or platform spec is incorrect. Check your connection and platform name/version/URL. Error: npm: Command failed with exit code 1 Error output: npm ERR! code ETARGET npm ERR! notarget No matching version found for [email protected] npm ERR! notarget In most cases you or one of your dependencies are requesting npm ERR! notarget a package version that doesn't exist.
npm ERR! A complete log of this run can be found in: npm ERR!
/home/ubuntu/.npm/_logs/2018-07-12T04_30_18_048Z-debug.log at /usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/platform/addHelper.js:312:25 at _rejected (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/q/q.js:797:24) at /usr/local/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/q/q.js:823:30 at Promise.when (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:1142:31) at Promise.promise.promiseDispatch (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:808:41) at /usr/local/lib/node_modules/cordova/node_modules/q/q.js:624:44 at runSingle (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:137:13) at flush (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:125:13) at process._tickCallback (internal/process/next_tick.js:112:11) (node:20325) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1) (node:20325) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.