Search code examples
javaandroidhttpquickblox

adding quickblox android sdk with httpmime


i have android project which uses httpmime library for uploading images to sever using multipart/form request
and i'm now trying to add quickblox but when i try to build my project

Conversion to Dalvik format failed: Unable to execute dex: Multiple dex files define Lorg/apache/http/entity/mime/FormBodyPart;

i made many research on this problem and i found that quickblox contain httpmime and some people advices to remove httpmime and use classes in quickblox.jar but i couldn't find needed classes in quickblox.jar

for ex :MultipartEntityBuilder and StringBody.

any help ?


Solution

  • i solved my problem by by adding quickblox jars files in my project build path then i deleted httpmime jar file from my project lib
    after that i downloaded the httpmime 4.3 source jar from here
    http mime source and extract it
    then created an android library project and added the httpmime packages to it with changes the packages name from
    org.apache.http.mime to myname.org,apache.http.mime
    finally i added the project as a library in my project and every things working great without any conflict