简体   繁体   English

用httpmime添加quickblox android sdk

[英]adding quickblox android sdk with httpmime

i have android project which uses httpmime library for uploading images to sever using multipart/form request 我有一个使用httpmime库用于使用multipart / form请求将图像上传到服务器的android项目
and i'm now trying to add quickblox but when i try to build my project 现在我正在尝试添加quickblox但是当我尝试构建项目时

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 我对此问题进行了许多研究,发现quickblox包含httpmime,并且有人建议删除httpmime并在quickblox.jar中使用类,但是我在quickblox.jar中找不到所需的类。

for ex :MultipartEntityBuilder and StringBody. 例如:MultipartEntityBuilder和StringBody。

any help ? 有什么帮助吗?

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 我通过在项目构建路径中添加quickblox jar文件解决了我的问题,然后从项目库中删除了httpmime jar文件
after that i downloaded the httpmime 4.3 source jar from here 之后,我从这里下载了httpmime 4.3源jar
http mime source and extract it http mime来源并将其解压缩
then created an android library project and added the httpmime packages to it with changes the packages name from 然后创建一个android库项目,并向其中添加httpmime包,并更改包名称,从
org.apache.http.mime to myname.org,apache.http.mime org.apache.http.mimemyname.org,apache.http.mime
finally i added the project as a library in my project and every things working great without any conflict 最终,我将该项目添加为我的项目中的库,并且一切正常,没有任何冲突

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM