0
votes

Hello whenever I run the following command

ionic cordova platform add android

It results to following error:

(node:304) UnhandledPromiseRejectionWarning: CordovaError: No platforms added to this project. Please use `cordova platform add <platform>`.
at Object.preProcessOptions (C:\Users\mjdem\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\src\cordova\util.js:312:15)
at C:\Users\mjdem\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\src\cordova\run.js:30:32
at _fulfilled (C:\Users\mjdem\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\node_modules\q\q.js:787:54)
at self.promiseDispatch.done (C:\Users\mjdem\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\node_modules\q\q.js:816:30)
at Promise.promise.promiseDispatch (C:\Users\mjdem\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\node_modules\q\q.js:749:13)
at C:\Users\mjdem\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\node_modules\q\q.js:810:14
at flush (C:\Users\mjdem\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\node_modules\q\q.js:108:17)
at _combinedTickCallback (internal/process/next_tick.js:131:7)
at process._tickCallback (internal/process/next_tick.js:180:9)
at Function.Module.runMain (module.js:695:11)

(node:304) 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:304) [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.

1
Have you downloaded the android package ? - Sergio Escudero
Yeah, I have downloaded it. Since I was previously developing in the android studio. - Mrityunjay Kumar

1 Answers

0
votes

Try this command:
cordova platform add android