title: MultipartEntityBuilder to send pictures to rail server
body: <p>I am trying to send a <code>MultipartEntityBuilder </code> to my Rails server. However when i try to build it it crashes and gives me the error</p>
  <blockquote>
  <p>03-25 09:44:50.001 W/System.err﹕
  java.util.concurrent.ExecutionException: java.lang.NoSuchMethodError:
  No static method
  create(Ljava/lang/String;[Lorg/apache/http/NameValuePair;)Lorg/apache/http/entity/ContentType;
  in class Lorg/apache/http/entity/ContentType; or its super classes
  (declaration of 'org.apache.http.entity.ContentType</p>
  </blockquote>
  <pre><code>        HttpPost httpost = new HttpPost(url);
          MultipartEntityBuilder entity = new MultipartEntityBuilder.create();
          entity.setMode(HttpMultipartMode.BROWSER_COMPATIBLE);
          for(int index=0; index &lt; nameValuePairs.size(); index++) { 
              ContentBody cb;
              if(nameValuePairs.get(index).getName().equalsIgnoreCase(&quot;File&quot;)) { 
                  File file = new File(nameValuePairs.get(index).getValue());
                  FileBody isb = new FileBody(file);
                  entity.addPart(nameValuePairs.get(index).getName(), isb);
              } else { 
                  // Normal string data 
                                      
                  cb =  new StringBody(nameValuePairs.get(index).getValue(),ContentType.TEXT_PLAIN);
                  entity.addPart(nameValuePairs.get(index).getName(),cb); 
              } 
          } 
   return entity.build();
  </code></pre>
  <p>This is the code i am using and i am still getting errors on the building of the the MultipartEntity it'll say the error.</p>