HttpResponse response = null;
try {
MultipartEntity multipartEntity = new MultipartEntity(HttpMultipartMode.BROWSER_COMPATIBLE);
multipartEntity.addPart("name", new StringBody("nameText"));
multipartEntity.addPart("place", new StringBody("placeText"));
multipartEntity.addPart("tag", new StringBody("tagText"));
//multipartEntity.addPart("Description", new StringBody(Settings.SHARE.TEXT));
multipartEntity.addPart("Image", new FileBody(destination));
httppost.setEntity(multipartEntity);
httpclient.execute(httppost);
} catch (Exception e) {
Log.e( "Error","error");
}
Error message:
Could not find class 'org.apache.http.entity.mime.MultipartEntity'
And I have tried manually creating libs folder and manually including jar files into /libs folder. When I do that it fails to compile.
Error:
Conversion to Dalvik format failed with error 1 Unkonws Android Packaging Problem
Tried creating fresh application including libraries. And I encountered the same error. I've tried everything possible. Can anyone tell me why this happens and how to fix it?
Any help would be greatly appreciated!!
Cheers