我试图将'MultipartEntityBuilder'文件导入到一个Android项目中,但在我的一生中找不到正确的存储库。
已经在Apache HttpComponents网站上尝试了这三种方法,但没有成功:
compile 'org.apache.httpcomponents:httpcore:4.4.3'
compile 'org.apache.httpcomponents:httpclient:4.5.1'
compile 'org.apache.httpcomponents:httpasyncclient:4.1'有人能指点我正确的方向吗?提前谢谢。
发布于 2015-10-27 05:43:45
回答我自己的问题(经过大约一个小时的搜索).
compile 'org.apache.httpcomponents:httpcore:4.4.3'
compile 'org.apache.httpcomponents:httpmime:4.5.1'最后一个有MultipartEntityBuilder在里面。可以去掉httpasyncclient和httpclient
还需要在gradle文件中添加“排除”:Duplicate files copied (Android Studio 0.4.0)
packagingOptions {
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/NOTICE'
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
}吐出假人否则,告诉你的东西(红色),你不关心与重复的文件。
https://stackoverflow.com/questions/33338928
复制相似问题