Reputation: 5990
When I try to build a phonegap/cordova app with command:
cordova build android
I'm getting an error:
BUILD FAILED
Target "debug" does not exist in the project "CordovaApp".
Total time: 0 seconds
/path_to_app/platforms/android/cordova/node_modules/q/q.js:126
throw e;
^
Error code 1 for command: ant with args: debug,-f,/path_to_app/platforms/android/build.xml,-Dout.dir=ant-build,-Dgen.absolute.dir=ant-gen
ERROR building one of the platforms: Error: /path_to_app/platforms/android/cordova/build: Command failed with exit code 8
You may not have the required environment or OS to build this project
I think it can be related with my ~/Library/Android/sdk/tools/ant/build.xml
file - I maybe accidentally mess it up - could anyone provide me code from that file?
Please help.
Upvotes: 1
Views: 495
Reputation: 7041
The Ant build is failing with this error message:
Target "debug" does not exist in the project "CordovaApp".
The following part of the error message shows that something is trying to run the debug
target of Ant:
Error code 1 for command: ant with args: debug,-f,/path_to_app/platforms/android/build.xml
The file /path_to_app/platforms/android/build.xml
likely doesn't have a target named debug
. This is why Ant fails. You will need to determine what is launching the Ant script and why the launcher expects the build.xml
file to have a debug
target.
Upvotes: 1