Android build issue (rejection id:1)

Hello,

I’m having an issue building for Android.
This is the output I’m getting:

[13:18:09]  lint finished in 4.17 s
> cordova build android
Android Studio project detected
(node:5548) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: Cannot find module '../cordova/platform_metadata'

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

This is my IONIC INFO:


Ionic:


   ionic (Ionic CLI)  : 4.1.1
   Ionic Framework    : ionic-angular 3.9.2
   @ionic/app-scripts : 3.2.0

Cordova:

   cordova (Cordova CLI) : 8.0.0
   Cordova Platforms     : android 7.1.1, ios 4.5.4
   Cordova Plugins       : cordova-plugin-ionic-keyboard 2.0.5, cordova-plugin-ionic-webview 1.1.1, (and 14 other plugins)

System:

   NodeJS : v8.2.1 (C:\Program Files\nodejs\node.exe)
   npm    : 6.4.1
   OS     : Windows 10

There seems to be a file missing from the platform.
You could trying reinstalling the platform by running the following commands:
ionic cordova platform remove android
and then you could use either
ionic cordova platform add android
or
ionic cordova prepare --no-build

I recommend using prepare although there aren’t many differences.

Thanks for the quick reply STRINIX, but I’n encountering the same issue after trying your solution…