4

Brand new install of the Android SDK, and Android Studio. Brand new project, literally no changes to any file in the project. Working AVD, running 4.4.3 (or something similar). I get the following error:

Gradle 'Gigviz' project refresh failed. Error:Could not find meta-data resource 'META-INF/services/javax.xml.datatype.DatatypeFactory' for service 'javax.xml.datatype.DatatypeFactory'.

The best reason I can think of for this error is that I'm missing some component of the javax.xml.datatype.DatatypeFactory dependency. Has anyone encountered this error before?

I'm on OS X Yosemite, latest version of Android Studio.

Hugh Rawlinson
  • 979
  • 9
  • 29
  • I saw your other question here with more info: https://stackoverflow.com/questions/26371301/unable-to-compile-any-android-project-due-to-gradle-fail-could-not-find-javax-x and your Facebook post (which is the only other hit when you Google that error message). This feels like a messed up installation of Java somehow, or your version of Java being incompatible with Gradle -- the stack trace is deep in the guts of Gradle and the Java libraries. This is the Sun JDK? You've tried it with a 1.7 JDK? Not just running Android Studio on 1.7, but compiling with it (the two are separate). – Scott Barta Feb 25 '15 at 16:35
  • Xerces problem>http://stackoverflow.com/questions/11677572/dealing-with-xerces-hell-in-java-maven? – Vrashabh Irde Feb 28 '15 at 06:02
  • I've tried Java 7 and 8, I've reinstalled Android Studio, Java, JDK, ADT, and Gradle (and used the version of Gradle bundled with Android Studio) in just about every combination I can think of. – Hugh Rawlinson Mar 01 '15 at 03:47

2 Answers2

1
  1. Download this : http://www.java2s.com/Code/Jar/j/Downloadjavaxxml134jar.htm

  2. Put it inside your JDK folder, in your program files. Something like this :

C:\Program Files\Java\jdk1.8.0_31\lib\missioncontrol\plugins

And see what happens.

0

Found this on Gradle's forums, same error cause by a duplicate set of jars, inside the JDK's lib/endorsed folder. Usually when I get any build errors with META-INF in them, it is because a duplicate files somewhere. Also make sure you are using Java 1.7 or lower.

tdavis20050
  • 171
  • 1
  • 5