title: NoClassDefFoundError in MultipartEntityBuilder while uploading file
body: <p>I want to upload image and send data to server. I am using MultipartEntityBuilder for this. I am coding on Android Studio.</p>
  
  <p>here is my code</p>
  
  <pre><code>HttpClient httpClient = new DefaultHttpClient();
  HttpPost httpPost = new HttpPost(config.api_url+"profile.php");
  
  MultipartEntityBuilder builder = MultipartEntityBuilder.create();
  builder.setMode(HttpMultipartMode.BROWSER_COMPATIBLE);
  
  if(mLastTakenImageAsJPEGFile!=null) {
      builder.addBinaryBody("image", mLastTakenImageAsJPEGFile);
  }
  
  builder.addTextBody("token", _appPrefs.getToken());
  final HttpEntity reqEntity = builder.build();
  
  httpPost.setEntity(reqEntity);
  </code></pre>
  
  <p>I am getting Runtime Error</p>
  
  <pre><code>java.lang.NoClassDefFoundError: org.apache.http.entity.ContentType 
  at 
  org.apache.http.entity.mime.MultipartEntityBuilder.addBinaryBody(MultipartEntityBuilder.java:146)
  </code></pre>
  
  <p>How to solve this?</p>