1

For some reason, my android phonegap build fails every time I try to run it.I can’t seem to figure out what the problem is.

I am using the latest version of Cordova (5.3.3) and downloaded the correct SDK for android using Android studio (I think).

Any ideas what I’m doing wrong?

Here are my CLI logs:

FAILURE: 
Build failed with an exception.



* What went wrong:

Execution failed for task ':prepareDebugDependencies'.

> 
javax.xml.xpath.XPathExpressionException: org.xml.sax.SAXParseException; lineNumber: 41; columnNumber: 94; The prefix "tools" for attribute "tools:overrideLibrary" associated with an element type "uses-sdk" is not bound.



* Try:

Run with --stacktrace
 option to get the stack trace. Run with --info
 or 
--debug
 option to get more log output.



BUILD FAILED




Total time: 4.325 secs


/Users/macuser/Desktop/bacon copy/bacontest/platforms/android/cordova/node_modules/q/q.js:126
                    throw e;
                    ^

Error code 1 for command: /Users/macuser/Desktop/bacon copy/bacontest/platforms/android/gradlew with args: cdvBuildDebug,-b,/Users/macuser/Desktop/bacon copy/bacontest/platforms/android/build.gradle,-Dorg.gradle.daemon=true

ERROR building one of the platforms: Error: /Users/macuser/Desktop/bacon copy/bacontest/platforms/android/cordova/build: Command failed with exit code 1
You may not have the required environment or OS to build this project

Error: /Users/macuser/Desktop/bacon copy/bacontest/platforms/android/cordova/build: Command failed with exit code 1
    at ChildProcess.whenDone (/usr/local/lib/node_modules/phonegap/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:139:23)
    at emitTwo (events.js:87:13)
    at ChildProcess.emit (events.js:172:7)
    at maybeClose (internal/child_process.js:817:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:211:

5)

  • please follow this [link](http://stackoverflow.com/questions/32557504/ionic-android-build-error-failed-to-find-android-home-environment-variable/32562168#32562168) it will be helpful for you – Anil kumar Dec 08 '15 at 04:57

0 Answers0