Apparently weird compilation error using org.apache.http.entity.StringEntity. Different behavior in two different projects
<p>I copied a code that worked fine in an Eclipse Java project to an Android project, and even though I import the same .jars, I get compilation errors in the Android project.</p>

<p>In the Android project, Eclipse shows the error "<em>The constructor StringEntity(String, String, String) is undefined</em>" in the following line:</p>

<pre><code>StringEntity se = new StringEntity("example data.", "application/json", "UTF-8");
</code></pre>

<p>But in the other Java project, it compiles and runs fine. The <a href="http://hc.apache.org/httpcomponents-core-ga/httpcore/apidocs/org/apache/http/entity/StringEntity.html" rel="nofollow">documentation</a> says that the constructor <code>StringEntity(String string, String mimeType, String charset)</code> does exist.</p>

<p>I'm importing the same <code>org.apache.http.entity.StringEntity</code> in the two projects. The jars used in the Eclipse project are the same used in the Android project. I even copied and pasted them. I cleaned the project too. Still no success. Can anyone please explain to me why this error is happening?</p>
