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
版权声明:本文为博主原创文章,转载请附上博文链接!