"java.lang.IllegalArgumentException: already added" when building a project which depends on library projects
<p><strong>Given</strong></p>

<pre><code>Commons - simple java project
AndroidLibrary1 - android library
AndroidLibrary2 - android library
AndroidProject - android project
</code></pre>

<p>And the projects have such references to each other:</p>

<pre><code>AndroidLibrary1 -&gt; Commons
AndroidLibrary2 -&gt; Commons
AndroidProject -&gt; AndroidLibrary1, AndroidLibrary2
</code></pre>

<p><strong>Problem</strong></p>

<p>When I build AndroidProject I get such error:</p>

<pre><code>java.lang.IllegalArgumentException: already added: Lcom/test/Bar;
</code></pre>

<p>where "com.test.Bar" is a class from "Commons" project, that used by both AndroidLibrary1 and AndroidLibrary2.</p>

<p><strong>Environment</strong></p>

<pre><code>Eclipse 3.7.1
android-sdk-windows_r15
</code></pre>

<p>Any ideas how to fix this?</p>

<p><strong>EDIT:</strong>
Found related <a href="http://groups.google.com/group/android-developers/browse_thread/thread/be2e726b9a1644a0/8e7009e0386444b6?lnk=gst&amp;q=already%20added#8e7009e0386444b6" rel="nofollow">discussion</a>.</p>
