title: Failed to build Android app (refer to both ActionBarSherlock & ViewPagerTabs) with Ant
body: <p>I have one Android app which uses ActionBarSherlock &amp; ViewPagerTabs. I use Eclipse to write and build it, and it just works well until I try to build it with Ant. Here's what I did:</p>
  
  <ol>
  <li>go to ActionBarSherlock folder, run "android update <strong>lib-project</strong> --path ."</li>
  <li>go to ViewPagerTabs folder, run "android update <strong>lib-project</strong> --path ." too</li>
  <li>go to app folder, run "android update <strong>project</strong> --path ."</li>
  <li>run "and debug" under app folder, and I got following errors:</li>
  </ol>
  
  <p>:</p>
  
  <pre><code>[javac] C:\Android\TestApp\src\com\test\App\TestActivity.java:46: cannot find symbol
  [javac] symbol  : method getSupportActionBar()
  [javac] location: class com.test.App.TestActivity
  [javac]         final ActionBar ab = getSupportActionBar();
  [javac]                              ^
  </code></pre>
  
  <p>So question NO. 1: <strong>I have correct library references in app's project.properties, and ActionBarSherlock &amp; ViewPagerTabs could be built successfully, why do I still get these errors?</strong></p>
  
  <p>There's a workaround for this issue -- copy all classes.jar under library's bin folder into app's libs folder, and run "ant debug" again. But I need to delete these .jar files under app's libs folder after all .java files of app could be compiled.</p>
  
  <p>Running "ant debug" again after this, I will get following errors:</p>
  
  <pre><code>[dx] processing archive C:\Android\ActionBarSherlock\library\bin\classes.jar...
  [dx] ignored resource META-INF/MANIFEST.MF
  [dx] processing android/support/v4/accessibilityservice/AccessibilityServiceInfoCompat$AccessibilityServiceInfoStubImpl.class...
  [dx] processing android/support/v4/accessibilityservice/AccessibilityServiceInfoCompat$AccessibilityServiceInfoVersionImpl.class...
  [dx] processing android/support/v4/accessibilityservice/AccessibilityServiceInfoCompat.class...
  [dx] processing android/support/v4/accessibilityservice/AccessibilityServiceInfoCompatIcs.class...
  [dx] processing android/support/v4/app/ActionBar$LayoutParams.class...
  [dx] processing android/support/v4/app/ActionBar$OnMenuVisibilityListener.class...
  [dx] processing android/support/v4/app/ActionBar$OnNavigationListener.class...
  [dx] processing android/support/v4/app/ActionBar$Tab.class...
  [dx] processing android/support/v4/app/ActionBar$TabListener.class...
  [dx] processing android/support/v4/app/ActionBar.class...
  [dx] processing android/support/v4/app/ActivityCompatHoneycomb.class...
  [dx] 
  [dx] UNEXPECTED TOP-LEVEL EXCEPTION:
  [dx] java.lang.IllegalArgumentException: already added: Landroid/support/v4/app/ActivityCompatHoneycomb;
  [dx]    at com.android.dx.dex.file.ClassDefsSection.add(ClassDefsSection.java:123)
  [dx]    at com.android.dx.dex.file.DexFile.add(DexFile.java:163)
  [dx]    at com.android.dx.command.dexer.Main.processClass(Main.java:486)
  [dx]    at com.android.dx.command.dexer.Main.processFileBytes(Main.java:455)
  [dx]    at com.android.dx.command.dexer.Main.access$400(Main.java:67)
  [dx]    at com.android.dx.command.dexer.Main$1.processFileBytes(Main.java:394)
  [dx]    at com.android.dx.cf.direct.ClassPathOpener.processArchive(ClassPathOpener.java:245)
  [dx]    at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:131)
  [dx]    at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:109)
  [dx]    at com.android.dx.command.dexer.Main.processOne(Main.java:418)
  [dx]    at com.android.dx.command.dexer.Main.processAllFiles(Main.java:329)
  [dx]    at com.android.dx.command.dexer.Main.run(Main.java:206)
  [dx]    at com.android.dx.command.dexer.Main.main(Main.java:174)
  [dx]    at com.android.dx.command.Main.main(Main.java:95)
  [dx] 1 error; aborting
  </code></pre>
  
  <p>My question NO.2 is: <strong>how can I fix this issue?</strong></p>
  
  <p>Thanks!</p>