Cordova build.bat giving error when running ionic build android


My application was working just fine until I integrated PushPlugin push notification and I cant seem to get out of this error at all

iTotal time: 1 second
Error code 1 for command: cmd with args: /s,/c,ant,debug,-f,C:\workshop\temp\platforms\android\build
Error: C:\workshop\temp\platforms\android\cordova\build.bat: Command failed with exit code 2
at ChildProcess.whenDone (C:\Users\rashmib\AppData\Roaming\npm\node_modules\cordova\src\superspa
at ChildProcess.EventEmitter.emit (events.js:98:17)
at maybeClose (child_process.js:735:16)
at Process.ChildProcess._handle.onexit (child_process.js:802:5)
ERROR: Unable to build app on platform android. Please see console for more info.


No experience with that plugin here.

Have you tried just doing : > cordova build android to see if that solves the problem? If Cordova can’t build with it, I don’t know how much help we’ll be here on the Ionic forum.


And if that plugin is giving you trouble, why not try the official cordova plugin for notifications.


I have not used local notifications but I have been using the Aerogear Cordova Push Plugin along with their Unified Push Server. You might try removing the plugin with "cordova plugin remove " and then adding it again. In the past, sometimes, I have removed the platform with “cordova platform remove android” and added it back to get around strange error messages. Also, make sure the all of the files in the project are writable. Usually, you get a message as to which one it needs to update, however, not always. Another issue for android, if you have the project in Eclipse for example, make sure the class files are not being placed in the same place the CLI is using.


for first error try
from the ANT_HOME directory run:
ant -f fetch.xml -Ddest=system