我正在尝试将'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'
Run Code Online (Sandbox Code Playgroud)
任何人都可以指出我正确的方向吗?提前致谢。
回答我自己的问题(经过大约一个小时的搜索)...
compile 'org.apache.httpcomponents:httpcore:4.4.3'
compile 'org.apache.httpcomponents:httpmime:4.5.1'
Run Code Online (Sandbox Code Playgroud)
最后一个MultipartEntityBuilder在里面。可以取出httpasyncclient和httpclient
还需要在您的 gradle 文件中添加排除项:复制的重复文件(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'
}
Run Code Online (Sandbox Code Playgroud)
否则会吐假人并告诉你你不关心的与重复文件相关的东西(红色)。
| 归档时间: |
|
| 查看次数: |
5019 次 |
| 最近记录: |