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-07-02 21:55:47

    Nginx出现500 Internal Server Error 错误的解决方案

    Nginx 500错误(Internal Server Error 内部服务器错误):500错误指的是服务器内部错误,也就是服务器遇到意外情况,而无法履行请求。 在高并发连接的情况下,Nginx是Apache服务器不错的替代品。Nginx同时也可以作为7层负载均衡服务器来使用。根据测试结果,Nginx 0.6.31 + PHP 5.2.6 (FastCGI) 可以承受3万以上的并发连接数,相当于同等环境下Apache的10倍。

  • 2019-07-09 20:23:42

    如何在windows服务器上面创建定时任务

    在Linux上面运行java程序要比在windows上面跑稳定很多,但是总有些情况下我们的程序跑在了windows上面,这就需要我们对windows server有所了解。今天给大家介绍下如何在windows服务器上面创建定时任务来定时执行java程序。

  • 2019-07-09 20:25:19

    linux实现自动远程备份(scp+ssh)

    刚上线的服务器需要备份日志,要备份到另一台服务器上去,为了减少工作量,采用linux的定时任务去自动执行。因服务器都是linux的,因此采用linux的远程复制scp命令。但这里涉及到一个问题,就是scp命令执行时需要输入密码,在网上大概搜集了下有两种方法:①一种是采用except方法(会存储明文密码);②采用ssh生成密钥的方式。这里我采用第二种方式。耗时两天,中途遇到各种问题,不过总算解决了

  • 2019-07-09 20:26:49

    使用Mysqldump命令备份和恢复Mysql数据库

    之前一直习惯用phpmyadmin备份恢复数据库,不过数据库文件大了用phpmyadmin就不行了。这时候我们就需要Mysqldump来备份和恢复。以下内容来自网络。

  • 2019-07-10 18:02:28

    Centos7安装percona-xtrabackup2.4和8.0版本

    Percona XtraBackup是一个基于MySQL的服务器的开源热备份实用程序 ,它不会在备份期间锁定您的数据库。 无论是24x7高负载服务器还是低事务量环境,Percona XtraBackup都旨在使备份成为一个无缝过程,而不会破坏生产环境中服务器的性能。