i have a working android project whose www is provided by my freind. And I created cordova project and added android platform for the same. Then replaced the www folder with the project www. When i build the cordova project it shows this error.
BUILD FAILED
C:\Android\adt-bundle\sdk\tools\ant\build.xml:932: The following error occurred
while executing this line:
C:\Android\adt-bundle\sdk\tools\ant\build.xml:950: null returned: -1073741819
Total time: 11 seconds
C:\Android\fresh\platforms\android\cordova\node_modules\q\q.js:126
throw e;
^
Error code 1 for command: cmd with args: /s,/c,ant,debug,-f,C:\Android\fresh\pla
tforms\android\build.xml,-Dout.dir=ant-build,-Dgen.absolute.dir=ant-gen
Error: C:\Android\fresh\platforms\android\cordova\build.bat: Command failed with
exit code 8
at ChildProcess.whenDone (C:\Users\riyas\AppData\Roaming\npm\node_modules\co
rdova\node_modules\cordova-lib\src\cordova\superspawn.js:135:23)
at ChildProcess.emit (events.js:98:17)
at maybeClose (child_process.js:756:16)
at Process.ChildProcess._handle.onexit (child_process.js:823:5)
Finally i have solved this issue, ie the error -1073741819 . this is due to bug in aapt.exe file build-tools in sdk for windows users.
Replace the aapt.exe file with this file https://android.googlecode.com/issues/attachment?aid=776290120000&name=aapt.exe.zip&token=ABZ6GAcRj6lR-sOmUyVguB0Gmf_BI4Z7Gg%3A1415016896298
for more information, Check this page
just upgrade your android sdk to a stable version.. i was using 21, but upgraded to 21.02. then i rebuilt it and it worked.