注:该方法只适用于引入了多个同类型不同版本的jar包
Android有时候引入jar包会出现各种冲突,出现了问题不要烦躁,也不是什么大的问题
下面就是出现错误的提示:
Duplicate class org.apache.http.client.fluent.Async found in modules fluent-hc-4.2.5.jar (fluent-hc-4.2.5.jar) and fluent-hc-4.5.10.jar (fluent-hc-4.5.10.jar)
Duplicate class org.apache.http.client.fluent.Async$ExecRunnable found in modules fluent-hc-4.2.5.jar (fluent-hc-4.2.5.jar) and fluent-hc-4.5.10.jar (fluent-hc-4.5.10.jar)
Duplicate class org.apache.http.client.fluent.Content found in modules fluent-hc-4.2.5.jar (fluent-hc-4.2.5.jar) and fluent-hc-4.5.10.jar (fluent-hc-4.5.10.jar)
Duplicate class org.apache.http.client.fluent.ContentResponseHandler found in modules fluent-hc-4.2.5.jar (fluent-hc-4.2.5.jar) and fluent-hc-4.5.10.jar (fluent-hc-4.5.10.jar)
Duplicate class org.apache.http.client.fluent.Executor found in modules fluent-hc-4.2.5.jar (fluent-hc-4.2.5.jar) and fluent-hc-4.5.10.jar (fluent-hc-4.5.10.jar)
Duplicate class org.apache.http.client.fluent.Form found in modules fluent-hc-4.2.5.jar (fluent-hc-4.2.5.jar) and fluent-hc-4.5.10.jar (fluent-hc-4.5.10.jar)
Duplicate class org.apache.http.client.fluent.HttpHeader found in modules fluent-hc-4.2.5.jar (fluent-hc-4.2.5.jar) and fluent-hc-4.5.10.jar (fluent-hc-4.5.10.jar)
Duplicate class org.apache.http.client.fluent.Request found in modules fluent-hc-4.2.5.jar (fluent-hc-4.2.5.jar) and fluent-hc-4.5.10.jar (fluent-hc-4.5.10.jar)
Duplicate class org.apache.http.client.fluent.Response found in modules fluent-hc-4.2.5.jar (fluent-hc-4.2.5.jar) and fluent-hc-4.5.10.jar (fluent-hc-4.5.10.jar)
Duplicate class org.apache.http.entity.mime.AbstractMultipartForm found in modules httpmime-4.3.4.jar (httpmime-4.3.4.jar) and httpmime-4.5.10.jar (httpmime-4.5.10.jar)
Duplicate class org.apache.http.entity.mime.FormBodyPart found in modules httpmime-4.3.4.jar (httpmime-4.3.4.jar) and httpmime-4.5.10.jar (httpmime-4.5.10.jar)
Duplicate class org.apache.http.entity.mime.Header found in modules httpmime-4.3.4.jar (httpmime-4.3.4.jar) and httpmime-4.5.10.jar (httpmime-4.5.10.jar)
Duplicate class org.apache.http.entity.mime.HttpBrowserCompatibleMultipart found in modules httpmime-4.3.4.jar (httpmime-4.3.4.jar) and httpmime-4.5.10.jar (httpmime-4.5.10.jar)
Duplicate class org.apache.http.entity.mime.HttpMultipart found in modules httpmime-4.3.4.jar (httpmime-4.3.4.jar) and httpmime-4.5.10.jar (httpmime-4.5.10.jar)
Duplicate class org.apache.http.entity.mime.HttpMultipart$1 found in modules httpmime-4.3.4.jar (httpmime-4.3.4.jar) and httpmime-4.5.10.jar (httpmime-4.5.10.jar)
Duplicate class org.apache.http.entity.mime.HttpMultipartMode found in modules httpmime-4.3.4.jar (httpmime-4.3.4.jar) and httpmime-4.5.10.jar (httpmime-4.5.10.jar)
Duplicate class org.apache.http.entity.mime.HttpRFC6532Multipart found in modules httpmime-4.3.4.jar (httpmime-4.3.4.jar) and httpmime-4.5.10.jar (httpmime-4.5.10.jar)
Duplicate class org.apache.http.entity.mime.HttpStrictMultipart found in modules httpmime-4.3.4.jar (httpmime-4.3.4.jar) and httpmime-4.5.10.jar (httpmime-4.5.10.jar)
Duplicate class org.apache.http.entity.mime.MIME found in modules httpmime-4.3.4.jar (httpmime-4.3.4.jar) and httpmime-4.5.10.jar (httpmime-4.5.10.jar)
Duplicate class org.apache.http.entity.mime.MinimalField found in modules httpmime-4.3.4.jar (httpmime-4.3.4.jar) and httpmime-4.5.10.jar (httpmime-4.5.10.jar)
Duplicate class org.apache.http.entity.mime.MultipartEntity found in modules httpmime-4.3.4.jar (httpmime-4.3.4.jar) and httpmime-4.5.10.jar (httpmime-4.5.10.jar)
Duplicate class org.apache.http.entity.mime.MultipartEntityBuilder found in modules httpmime-4.3.4.jar (httpmime-4.3.4.jar) and httpmime-4.5.10.jar (httpmime-4.5.10.jar)
Duplicate class org.apache.http.entity.mime.MultipartEntityBuilder$1 found in modules httpmime-4.3.4.jar (httpmime-4.3.4.jar) and httpmime-4.5.10.jar (httpmime-4.5.10.jar)
解决方法:
1、看提示
Duplicate class org.apache.http.client.fluent.Async found in modules fluent-hc-4.2.5.jar (fluent-hc-4.2.5.jar) and fluent-hc-4.5.10.jar (fluent-hc-4.5.10.jar)
这一段话的意思是,fluent-hc-4.2.5.jar和fluent-hc-4.5.10.jar发生了冲突
2、随便删除其中一个,问题解决