for example, for httpclient use HttpUrlConnection or okhttp instead

2018-10-23 02:29:11

Error:Error: commons-logging defines classes that conflict with classes now provided by Android. Solutions include finding newer versions or alternative libraries that don't have the same problem (for example, for httpclient use HttpUrlConnection or okhttp instead), or repackaging the library using something like jarjar. [DuplicatePlatformClasses]


Error:Error: httpclient defines classes that conflict with classes now provided by Android. Solutions include finding newer versions or alternative libraries that don't have the same problem (for example, for httpclient use HttpUrlConnection or okhttp instead), or repackaging the library using something like jarjar. [DuplicatePlatformClasses]






原因:去除commons-logging.jar包后 maven依赖的commons-logging与系统自带的起冲突了.


解决办法:build.gradle(内)添加configurations {all {exclude module: 'httpclient'exclude module: 'commons-logging'}}或libs里添加对应jar包

--------------------- 

作者:xiaoerbuyu1233 

来源:CSDN 

原文:https://blog.csdn.net/xiaoerbuyu1233/article/details/79215010 

版权声明:本文为博主原创文章,转载请附上博文链接!

  • 2019-10-21 15:06:27

    yarn详细入门教程

    Yarn 是 Facebook, Google, Exponent 和 Tilde 开发的一款新的 JavaScript 包管理工具。就像我们可以从官方文档了解那样,它的目的是解决这些团队使用 npm 面临的少数问题,即:

  • 2019-10-23 10:20:48

    php 去掉 头尾 空格 2种方法

    看似很简单的问题,其实还是有点坑的,首先这里 空格转义,不是字符串,直接用trim()是去不掉。

  • 2019-10-23 23:25:22

    PostMapping,GetMapping不固定路径的写法

    PostMapping中的value属性是数组,所以可以定义多个路径,required属性默认是true,不必再写required=true,默认表示该参数是必须要有的,如果写required=false,表示该参数是可选的,可有可无。

  • 2019-10-24 01:14:29

    通过属性搜索商品mysql设计

    属性是可以动态扩展的,问题:属性是搜索条件 问:请展示出 材质为塑料 防水为YES,颜色为绿色的商品详细信息,按照sort_filed排序

  • 2019-10-25 15:18:18

    Vue.use Vue.prototype区别

    1、不是为了vue写的插件(插件内要处理)不支持Vue.use()加载方式 2、非vue官方库不支持new Vue()方式 3、每一个vue组件都是Vue的实例,所以组件内this可以拿到Vue.prototype上添加的属性和方法。

  • 2019-10-25 23:33:45

    php制作漂亮的随机颜色标签云效果

    代码中的array里面的字符串就是各种随机色的编码,大家可以根据自己的需求来配置颜色。 然后input1里面是字体大小的随机代码,也可以自行修改。

  • 2019-10-27 00:23:42

    mac卡住,强制关闭应用

    要正常退出(关闭)Mac 应用,请从菜单栏的应用菜单中选取“退出”,或按下 Command (⌘)-Q。如果应用不退出,请按照以下步骤强制该应用退出。