Error:Error: commons-logging defines classes that conflict with classes now provided by Android

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]

解决办法

//在app的build.gradle文件中加入一句 configurations {all {exclude module: 'httpclient'exclude module: 'commons-logging'}}
加入之后
android { // 加载android里面
 configurations {all {exclude module: 'httpclient'exclude module: 'commons-logging'}}
}

你可能感兴趣的