Android : Gradle build fails: Error: org.apache.xerces.dom.DocumentImpl cannot be cast to >org.apache.xerces.dom.DeferredDocumentImpl

on Sunday, January 18, 2015


I tried to test out Android Studio with a Hello World app. The build fails with this error:



Error:Error: org.apache.xerces.dom.DocumentImpl cannot be cast to org.apache.xerces.dom.DeferredDocumentImpl Possible causes for this unexpected error include:



  • Gradle's dependency cache may be corrupt (this sometimes occurs after a network connection timeout.) Re-download dependencies and sync project (requires network)

  • The state of a Gradle build process (daemon) may be corrupt. Stopping all Gradle daemons may solve this problem. Stop Gradle build processes (requires restart)


In the case of corrupt Gradle processes, you can also try closing the IDE and then killing all Java processes.

However, the same project with the same configuration builds on another laptop? What causes this error?


0 comments:

Post a Comment