title: NoSuchMethod error getting a gdata service
body: <p>I get the following error:</p>
  
  <pre><code>Exception in thread "main" java.lang.NoSuchMethodError: com.google.common.collect.ImmutableSet.of([Ljava/lang/Object;)Lcom/google/common/collect/ImmutableSet;
  at com.google.gdata.wireformats.AltFormat$Builder.setAcceptableTypes(AltFormat.java:399)
  at com.google.gdata.wireformats.AltFormat$Builder.setAcceptableXmlTypes(AltFormat.java:387)
  at com.google.gdata.wireformats.AltFormat.&lt;clinit&gt;(AltFormat.java:49)
  at com.google.gdata.client.Service.&lt;clinit&gt;(Service.java:558)
  at testproject.TestProject.run(TestProject.java:22)
  at testproject.TestProject.main(TestProject.java:31)
  Java Result: 1
  BUILD SUCCESSFUL (total time: 0 seconds)
  </code></pre>
  
  <p>This comes from the following code:</p>
  
  <pre><code>package testproject;
  
  import com.google.gdata.client.youtube.YouTubeService;
  import com.google.gdata.util.*;
  import java.util.logging.*;
  
  public class TestProject {
  
    public static void main(String[] args) {
      try {
        YouTubeService service = new YouTubeService("Test", "developerKey");
        service.setUserCredentials("root@gmail.com", "pa$$word");
      } catch (AuthenticationException ex) {
        Logger.getLogger(TestProject.class.getName()).log(Level.SEVERE, null, ex);
      }
    }
  }
  </code></pre>
  
  <p>At first, I included every library in <a href="http://code.google.com/p/gdata-java-client/downloads/list" rel="nofollow noreferrer">http://code.google.com/p/gdata-java-client/downloads/list</a> and also imported much more than I needed to.
  I've since removed the libraries I deemed unnecessary (thanks <a href="https://stackoverflow.com/users/1094597/thinksteep">thinksteep</a>). So the libraries I'm currently including are the following libraries:</p>
  
  <pre><code>mail.jar
  activation.jar
  ant.jar
  gdata-core-1.0.jar
  gdata-media-1.0.jar
  guava-11.0.1.jar
  gdata-youtube-2.0.jar
  gdata-youtube-met-2.0.jar
  </code></pre>
  
  <p>(There are probably a few libraries there which are not necessary... But I'm at my whit's end...)
  I'm just trying to test getting a YouTube service so I can get things going on this project, but no dice. Oh, and I've also included this library: <a href="http://code.google.com/p/guava-libraries" rel="nofollow noreferrer">http://code.google.com/p/guava-libraries</a> because before I was getting a NoClassDefFound error and including that library seemed to solve it. Thank you in advance for the help!
  Oh, and I also followed every step exactly (or at least I think so) in the gdata <a href="http://code.google.com/apis/gdata/articles/java_client_lib.html" rel="nofollow noreferrer">getting started guide</a>. My test build was successful by the end... Thanks again!</p>