when i tried to upload a file ., I had added httpmime-4.0.1 jar file.. i found a error in package declaration line..how can i clear this,,
ERROR
*Multiple markers at this line
-the type org.apache.james.mime4j.message.singlebody cannot be resolves , It is indirectly refrenced fron required .class files*
My Code.
public void uploading() {
//Url of the server
String url = "http://192.168.1.125/ui-design1/newremote/sendgisttoall";
HttpClient client = new DefaultHttpClient();
HttpPost post = new HttpPost(url);
MultipartEntity mpEntity = new MultipartEntity();
//Path of the file to be uploaded
File file = new File(filePath);
ContentBody cbFile = new FileBody(file);
//Add the data to the multipart entity
mpEntity.addPart("gistimage", cbFile);
mpEntity.addPart("token", new StringBody(token, Charset.forName("UTF-8")));
post.setEntity(mpEntity);
HttpResponse response1 = client.execute(post);
HttpEntity resEntity = response1.getEntity();
String Response=EntityUtils.toString(resEntity);
Log.d("Response:", Response);