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 

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

  • 2020-01-10 22:00:23

    又一款内网穿透工具搭建

    最近一个项目需要用到将订单发布到第三方平台,之后要是有人购买他们会请求我们这边的接口来改变订单状态等! 由于本地开发,测试的时候,他们那边请求我们这边接口的时候没法访问内网 所以要用到内网穿透 当然现在也有很多更简单的 比如花生壳就是很好的!

  • 2020-01-13 11:14:43

    p标签中的文本换行显示空白

    white-space: 如何处理元素中的空白,normal: 默认, 被浏览器忽略空白 pre: 空白被浏览器保留. nowrap: 文本不会换行, 会在同一行上继续, 一直走到需要换行为止 pre-wrap: 保留空白符序列, 但正常换行 pre-line: 合并空白符序列, 但正常换行 inherit: 从父元素继承white-space这个属性

  • 2020-01-13 11:26:40

    Ueditor报错not import language file vue

    解决办法,手动加载语言文件,提供了手动加载语言文件,避免ie下有时会因语言文件加载失败导致编辑器加载失败,提示"not import language file"的错误

  • 2020-01-13 11:30:56

    解决Uncaught SyntaxError: Unexpected token <

    今天写代码的时候发现了"Uncaught SyntaxError: Unexpected token <" <html>的js错误,而且还是html的第一行,我就蒙了,这第一行有啥问题啊,还有一个“<”符号,我以为是我的网页标签没有闭包,所以检查了一下,都不是啊!错误如图。

  • 2020-01-13 14:53:51

    sass中使用calc计算表达式变量问题

    calc()是css的一个函数,可用于元素计算长度,比如div宽度想要减去一个固定宽度后并自适应,可以写为calc(100% - 60px) 注意“-”两边有空格 sass已经是常用的预编译语言,允许使用变量等规则,如果上边写到60px是一个变量,这个表达怎么写呢

  • 2020-01-13 21:01:04

    vue路由的异步加载(懒加载)方法

    vue本身不多介绍。直接说问题,因为vue的所有路由都是加载在一个app.js里的,如果项目巨大,那么首页加载会是灾难。所以我们就需要把某些路由用异步加载(懒加载)的方式进行加载.

  • 2020-01-13 21:56:45

    Ant Design Pro nginx配置

    Ant Design Pro nginx配置 今天看了下Ant和nginx的配置 给大家分享下 下边的配置可以直接使用 修改为自己的域名和文件夹目录就可以