Error in android build


#1

When you run the command

ionic cordova run android --prod --release

This error appears


(node:13130) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'variables' of undefined
    at /usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/restore-util.js:322:57
    at Array.forEach (<anonymous>)
    at Object.installPluginsFromConfigXML (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/restore-util.js:318:28)
    at /usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/prepare.js:59:32
    at _fulfilled (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/q/q.js:787:54)
    at self.promiseDispatch.done (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/q/q.js:816:30)
    at Promise.promise.promiseDispatch (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/q/q.js:749:13)
    at /usr/local/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/q/q.js:557:44
    at flush (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/q/q.js:108:17)
    at process._tickCallback (internal/process/next_tick.js:112:11)
(node:13130) 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:13130) [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.

[OK] Your app has been deployed.
     Did you know you can live-reload changes from your app with --livereload?

can you help me


#2

Same error here, but I’m trying to build in the cloud. This error also happens when I try to remove and add the platform again.