我目前将我的android项目升级到最新的android版本,但是这样做,在尝试运行应用程序Like-
时给了我很多错误 Duplicate class android.support.v4.app.INotificationSideChannel found in modules core-1.0.0-runtime.jar (androidx.core:core:1.0.0) and support-v4-21.0.3-runtime.jar (com.android.support:support-v4:21.0.3)
Duplicate class android.support.v4.app.INotificationSideChannel$Stub found in modules core-1.0.0-runtime.jar (androidx.core:core:1.0.0) and support-v4-21.0.3-runtime.jar (com.android.support:support-v4:21.0.3)
Duplicate class android.support.v4.app.INotificationSideChannel$Stub$Proxy found in modules core-1.0.0-runtime.jar (androidx.core:core:1.0.0) and support-v4-21.0.3-runtime.jar (com.android.support:support-v4:21.0.3)
Duplicate class org.apache.http.Consts found in modules httpclient-android-4.3.5.jar (org.apache.httpcomponents:httpclient-android:4.3.5) and httpcore-4.3.3.jar (org.apache.httpcomponents:httpcore:4.3.3)
Duplicate class org.apache.http.ContentTooLongException found in modules httpclient-android-4.3.5.jar (org.apache.httpcomponents:httpclient-android:4.3.5) and httpcore-4.3.3.jar (org.apache.httpcomponents:httpcore:4.3.3)
Duplicate class org.apache.http.HttpConnectionFactory found in modules httpclient-android-4.3.5.jar (org.apache.httpcomponents:httpclient-android:4.3.5) and httpcore-4.3.3.jar (org.apache.httpcomponents:httpcore:4.3.3)
Duplicate class org.apache.http.HttpHeaders found in modules httpclient-android-4.3.5.jar (org.apache.httpcomponents:httpclient-android:4.3.5) and httpcore-4.3.3.jar (org.apache.httpcomponents:httpcore:4.3.3)
Duplicate class org.apache.http.MessageConstraintException found in modules httpclient-android-4.3.5.jar (org.apache.httpcomponents:httpclient-android:4.3.5) and httpcore-4.3.3.jar (org.apache.httpcomponents:httpcore:4.3.3)
Duplicate class org.apache.http.TruncatedChunkException found in modules httpclient-android-4.3.5.jar (org.apache.httpcomponents:httpclient-android:4.3.5) and httpcore-4.3.3.jar (org.apache.httpcomponents:httpcore:4.3.3)
Duplicate class org.apache.http.annotation.GuardedBy found in modules httpclient-android-4.3.5.jar (org.apache.httpcomponents:httpclient-android:4.3.5) and httpcore-4.3.3.jar (org.apache.httpcomponents:httpcore:4.3.3)
Duplicate class org.apache.http.annotation.Immutable found in modules httpclient-android-4.3.5.jar (org.apache.httpcomponents:httpclient-android:4.3.5) and httpcore-4.3.3.jar (org.apache.httpcomponents:httpcore:4.3.3)
Duplicate class org.apache.http.annotation.NotThreadSafe found in modules httpclient-android-4.3.5.jar (org.apache.httpcomponents:httpclient-android:4.3.5) and httpcore-4.3.3.jar (org.apache.httpcomponents:httpcore:4.3.3)
Duplicate class org.apache.http.annotation.ThreadSafe found in modules httpclient-android-4.3.5.jar (org.apache.httpcomponents:httpclient-android:4.3.5) and httpcore-4.3.3.jar (org.apache.httpcomponents:httpcore:4.3.3)
Duplicate class org.apache.http.auth.AuthOption found in modules httpclient-4.3.6.jar (org.apache.httpcomponents:httpclient:4.3.6) and httpclient-android-4.3.5.jar (org.apache.httpcomponents:httpclient-android:4.3.5)
Duplicate class org.apache.http.auth.AuthProtocolState found in modules httpclient-4.3.6.jar (org.apache.httpcomponents:httpclient:4.3.6) and httpclient-android-4.3.5.jar (org.apache.httpcomponents:httpclient-android:4.3.5)
Duplicate class org.apache.http.auth.AuthSchemeProvider found in modules httpclient-4.3.6.jar (org.apache.httpcomponents:httpclient:4.3.6) and httpclient-android-4.3.5.jar (org.apache.httpcomponents:httpclient-android:4.3.5)
Duplicate class org.apache.http.auth.ChallengeState found in modules httpclient-4.3.6.jar (org.apache.httpcomponents:httpclient:4.3.6) and httpclient-android-4.3.5.jar (org.apache.httpcomponents:httpclient-android:4.3.5)
Duplicate class org.apache.http.auth.ContextAwareAuthScheme found in modules httpclient-4.3.6.jar (org.apache.httpcomponents:httpclient:4.3.6) and httpclient-android-4.3.5.jar (org.apache.httpcomponents:httpclient-android:4.3.5)
Duplicate class org.apache.http.client.AuthCache found in modules httpclient-4.3.6.jar (org.apache.httpcomponents:httpclient:4.3.6) and httpclient-android-4.3.5.jar (org.apache.httpcomponents:httpclient-android:4.3.5)
Duplicate class org.apache.http.client.AuthenticationStrategy found in modules httpclient-4.3.6.jar (org.apache.httpcomponents:httpclient:4.3.6) and httpclient-android-4.3.5.jar (org.apache.httpcomponents:httpclient-android:4.3.5)
Duplicate class org.apache.http.client.BackoffManager found in modules httpclient-4.3.6.jar (org.apache.httpcomponents:httpclient:4.3.6) and httpclient-android-4.3.5.jar (org.apache.httpcomponents:httpclient-android:4.3.5)
Duplicate class org.apache.http.client.ConnectionBackoffStrategy found in modules httpclient-4.3.6.jar (org.apache.httpcomponents:httpclient:4.3.6) and httpclient-android-4.3.5.jar (org.apache.httpcomponents:httpclient-android:4.3.5)
Duplicate class org.apache.http.client.RedirectStrategy found in modules httpclient-4.3.6.jar (org.apache.httpcomponents:httpclient:4.3.6) and httpclient-android-4.3.5.jar (org.apache.httpcomponents:httpclient-android:4.3.5)
Duplicate class org.apache.http.client.ServiceUnavailableRetryStrategy found in modules httpclient-4.3.6.jar (org.apache.httpcomponents:httpclient:4.3.6) and httpclient-android-4.3.5.jar (org.apache.httpcomponents:httpclient-android:4.3.5)
Duplicate class org.apache.http.client.config.AuthSchemes found in modules httpclient-4.3.6.jar (org.apache.httpcomponents:httpclient:4.3.6) and httpclient-android-4.3.5.jar (org.apache.httpcomponents:httpclient-android:4.3.5)
Duplicate class org.apache.http.client.config.CookieSpecs found in modules httpclient-4.3.6.jar (org.apache.httpcomponents:httpclient:4.3.6) and httpclient-android-4.3.5.jar (org.apache.httpcomponents:httpclient-android:4.3.5)
Duplicate class org.apache.http.client.config.RequestConfig found in modules httpclient-4.3.6.jar (org.apache.httpcomponents:httpclient:4.3.6) and httpclient-android-4.3.5.jar (org.apache.httpcomponents:httpclient-android:4.3.5)
Duplicate class org.apache.http.client.config.RequestConfig$Builder found in modules httpclient-4.3.6.jar (org.apache.httpcomponents:httpclient:4.3.6) and httpclient-android-4.3.5.jar (org.apache.httpcomponents:httpclient-android:4.3.5)
Duplicate class org.apache.http.client.entity.DecompressingEntity found in modules httpclient-4.3.6.jar (org.apache.httpcomponents:httpclient:4.3.6) and httpclient-android-4.3.5.jar (org.apache.httpcomponents:httpclient-android:4.3.5)
Duplicate class org.apache.http.client.entity.DeflateDecompressingEntity found in modules httpclient-4.3.6.jar (org.apache.httpcomponents:httpclient:4.3.6) and httpclient-android-4.3.5.jar (org.apache.httpcomponents:httpclient-android:4.3.5)
Duplicate class org.apache.http.client.entity.DeflateInputStream found in modules httpclient-4.3.6.jar (org.apache.httpcomponents:httpclient:4.3.6) and httpclient-android-4.3.5.jar (org.apache.httpcomponents:httpclient-android:4.3.5)
Duplicate class org.apache.http.client.entity.DeflateInputStream$DeflateStream found in modules httpclient-4.3.6.jar (org.apache.httpcomponents:httpclient:4.3.6) and httpclient-android-4.3.5.jar (org.apache.httpcomponents:httpclient-android:4.3.5)
Duplicate class org.apache.http.client.entity.EntityBuilder found in modules httpclient-4.3.6.jar (org.apache.httpcomponents:httpclient:4.3.6) and httpclient-android-4.3.5.jar (org.apache.httpcomponents:httpclient-android:4.3.5)
Duplicate class org.apache.http.client.entity.GzipCompressingEntity found in modules httpclient-4.3.6.jar (org.apache.httpcomponents:httpclient:4.3.6) and httpclient-android-4.3.5.jar (org.apache.httpcomponents:httpclient-android:4.3.5)
Duplicate class org.apache.http.client.entity.GzipDecompressingEntity found in modules httpclient-4.3.6.jar (org.apache.httpcomponents:httpclient:4.3.6) and httpclient-android-4.3.5.jar (org.apache.httpcomponents:httpclient-android:4.3.5)
Duplicate class org.apache.http.client.entity.LazyDecompressingInputStream found in modules httpclient-4.3.6.jar (org.apache.httpcomponents:httpclient:4.3.6) and httpclient-android-4.3.5.jar (org.apache.httpcomponents:httpclient-android:4.3.5)
Duplicate class org.apache.http.client.methods.AbstractExecutionAwareRequest found in modules httpclient-4.3.6.jar (org.apache.httpcomponents:httpclient:4.3.6) and httpclient-android-4.3.5.jar (org.apache.httpcomponents:httpclient-android:4.3.5)
Duplicate class org.apache.http.client.methods.AbstractExecutionAwareRequest$1 found in modules httpclient-4.3.6.jar (org.apache.httpcomponents:httpclient:4.3.6) and httpclient-android-4.3.5.jar (org.apache.httpcomponents:httpclient-android:4.3.5)
Duplicate class org.apache.http.client.methods.AbstractExecutionAwareRequest$2 found in modules httpclient-4.3.6.jar (org.apache.httpcomponents:httpclient:4.3.6) and httpclient-android-4.3.5.jar (org.apache.httpcomponents:httpclient-android:4.3.5)
Duplicate class org.apache.http.client.methods.CloseableHttpResponse found in modules httpclient-4.3.6.jar (org.apache.httpcomponents:httpclient:4.3.6) and httpclient-android-4.3.5.jar (org.apache.httpcomponents:httpclient-android:4.3.5)
Duplicate class org.apache.http.client.methods.Configurable found in modules httpclient-4.3.6.jar (org.apache.httpcomponents:httpclient:4.3.6) and httpclient-android-4.3.5.jar (org.apache.httpcomponents:httpclient-android:4.3.5)
Duplicate class org.apache.http.client.methods.HttpExecutionAware found in modules httpclient-4.3.6.jar (org.apache.httpcomponents:httpclient:4.3.6) and httpclient-android-4.3.5.jar (org.apache.httpcomponents:httpclient-android:4.3.5)
Duplicate class org.apache.http.client.methods.HttpPatch found in modules httpclient-4.3.6.jar (org.apache.httpcomponents:httpclient:4.3.6) and httpclient-android-4.3.5.jar (org.apache.httpcomponents:httpclient-android:4.3.5)
Duplicate class org.apache.http.client.methods.HttpRequestWrapper found in modules httpclient-4.3.6.jar (org.apache.httpcomponents:httpclient:4.3.6) and httpclient-android-4.3.5.jar (org.apache.httpcomponents:httpclient-android:4.3.5)
Duplicate class org.apache.http.client.methods.HttpRequestWrapper$1 found in modules httpclient-4.3.6.jar (org.apache.httpcomponents:httpclient:4.3.6) and httpclient-android-4.3.5.jar (org.apache.httpcomponents:httpclient-android:4.3.5)
Duplicate class org.apache.http.client.methods.HttpRequestWrapper$HttpEntityEnclosingRequestWrapper found in modules httpclient-4.3.6.jar (org.apache.httpcomponents:httpclient:4.3.6) and httpclient-android-4.3.5.jar (org.apache.httpcomponents:httpclient-android:4.3.5)
Duplicate class org.apache.http.client.methods.RequestBuilder found in modules httpclient-4.3.6.jar (org.apache.httpcomponents:httpclient:4.3.6) and httpclient-android-4.3.5.jar (org.apache.httpcomponents:httpclient-android:4.3.5)
Duplicate class org.apache.http.client.methods.RequestBuilder$InternalEntityEclosingRequest found in modules httpclient-4.3.6.jar (org.apache.httpcomponents:httpclient:4.3.6) and httpclient-android-4.3.5.jar (org.apache.httpcomponents:httpclient-android:4.3.5)
Duplicate class org.apache.http.client.methods.RequestBuilder$InternalRequest found in modules httpclient-4.3.6.jar (org.apache.httpcomponents:httpclient:4.3.6) and httpclient-android-4.3.5.jar (org.apache.httpcomponents:httpclient-android:4.3.5)
Duplicate class org.apache.http.client.params.HttpClientParamConfig found in modules httpclient-4.3.6.jar (org.apache.httpcomponents:httpclient:4.3.6) and httpclient-android-4.3.5.jar (org.apache.httpcomponents:httpclient-android:4.3.5)
Duplicate class org.apache.http.client.protocol.HttpClientContext found in modules httpclient-4.3.6.jar (org.apache.httpcomponents:httpclient:4.3.6) and httpclient-android-4.3.5.jar (org.apache.httpcomponents:httpclient-android:4.3.5)
Duplicate class org.apache.http.client.protocol.RequestAcceptEncoding found in modules httpclient-4.3.6.jar (org.apache.httpcomponents:httpclient:4.3.6) and httpclient-android-4.3.5.jar (org.apache.httpcomponents:httpclient-android:4.3.5)
Duplicate class org.apache.http.client.protocol.RequestAuthCache found in modules httpclient-4.3.6.jar (org.apache.httpcomponents:httpclient:4.3.6) and httpclient-android-4.3.5.jar (org.apache.httpcomponents:httpclient-android:4.3.5)
Duplicate class org.apache.http.client.protocol.RequestClientConnControl found in modules httpclient-4.3.6.jar (org.apache.httpcomponents:httpclient:4.3.6) and httpclient-android-4.3.5.jar (org.apache.httpcomponents:httpclient-android:4.3.5)
Duplicate class org.apache.http.client.protocol.RequestExpectContinue found in modules httpclient-4.3.6.jar (org.apache.httpcomponents:httpclient:4.3.6) and httpclient-android-4.3.5.jar (org.apache.httpcomponents:httpclient-android:4.3.5)
Duplicate class org.apache.http.client.protocol.ResponseContentEncoding found in modules httpclient-4.3.6.jar (org.apache.httpcomponents:httpclient:4.3.6) and httpclient-android-4.3.5.jar (org.apache.httpcomponents:httpclient-android:4.3.5)
Duplicate class org.apache.http.client.utils.DateUtils found in modules httpclient-4.3.6.jar (org.apache.httpcomponents:httpclient:4.3.6) and httpclient-android-4.3.5.jar (org.apache.httpcomponents:httpclient-android:4.3.5)
Duplicate class org.apache.http.client.utils.DateUtils$DateFormatHolder found in modules httpclient-4.3.6.jar (org.apache.httpcomponents:httpclient:4.3.6) and httpclient-android-4.3.5.jar (org.apache.httpcomponents:httpclient-android:4.3.5)
Duplicate class org.apache.http.client.utils.DateUtils$DateFormatHolder$1 found in modules httpclient-4.3.6.jar (org.apache.httpcomponents:httpclient:4.3.6) and httpclient-android-4.3.5.jar (org.apache.httpcomponents:httpclient-android:4.3.5)
Duplicate class org.apache.http.client.utils.HttpClientUtils found in modules httpclient-4.3.6.jar (org.apache.httpcomponents:httpclient:4.3.6) and httpclient-android-4.3.5.jar (org.apache.httpcomponents:httpclient-android:4.3.5)
Duplicate class org.apache.http.client.utils.Idn found in modules httpclient-4.3.6.jar (org.apache.httpcomponents:httpclient:4.3.6) and httpclient-android-4.3.5.jar (org.apache.httpcomponents:httpclient-android:4.3.5)
Duplicate class org.apache.http.client.utils.JdkIdn found in modules httpclient-4.3.6.jar (org.apache.httpcomponents:httpclient:4.3.6) and httpclient-android-4.3.5.jar (org.apache.httpcomponents:httpclient-android:4.3.5)
Duplicate class org.apache.http.client.utils.Punycode found in modules httpclient-4.3.6.jar (org.apache.httpcomponents:httpclient:4.3.6) and httpclient-android-4.3.5.jar (org.apache.httpcomponents:httpclient-android:4.3.5)
Duplicate class org.apache.http.client.utils.Rfc3492Idn found in modules httpclient-4.3.6.jar (org.apache.httpcomponents:httpclient:4.3.6) and httpclient-android-4.3.5.jar (org.apache.httpcomponents:httpclient-android:4.3.5)
Duplicate class org.apache.http.client.utils.URIBuilder found in modules httpclient-4.3.6.jar (org.apache.httpcomponents:httpclient:4.3.6) and httpclient-android-4.3.5.jar (org.apache.httpcomponents:httpclient-android:4.3.5)
Duplicate class org.apache.http.concurrent.BasicFuture found in modules httpclient-android-4.3.5.jar (org.apache.httpcomponents:httpclient-android:4.3.5) and httpcore-4.3.3.jar (org.apache.httpcomponents:httpcore:4.3.3)
Duplicate class org.apache.http.concurrent.Cancellable found in modules httpclient-android-4.3.5.jar (org.apache.httpcomponents:httpclient-android:4.3.5) and httpcore-4.3.3.jar (org.apache.httpcomponents:httpcore:4.3.3)
Duplicate class org.apache.http.concurrent.FutureCallback found in modules httpclient-android-4.3.5.jar (org.apache.httpcomponents:httpclient-android:4.3.5) and httpcore-4.3.3.jar (org.apache.httpcomponents:httpcore:4.3.3)
Duplicate class org.apache.http.config.ConnectionConfig found in modules httpclient-android-4.3.5.jar (org.apache.httpcomponents:httpclient-android:4.3.5) and httpcore-4.3.3.jar (org.apache.httpcomponents:httpcore:4.3.3)
Duplicate class org.apache.http.config.ConnectionConfig$Builder found in modules httpclient-android-4.3.5.jar (org.apache.httpcomponents:httpclient-android:4.3.5) and httpcore-4.3.3.jar (org.apache.httpcomponents:httpcore:4.3.3)
Duplicate class org.apache.http.config.Lookup found in modules httpclient-android-4.3.5.jar (org.apache.httpcomponents:httpclient-android:4.3.5) and httpcore-4.3.3.jar (org.apache.httpcomponents:httpcore:4.3.3)
Duplicate class org.apache.http.config.MessageConstraints found in modules httpclient-android-4.3.5.jar (org.apache.httpcomponents:httpclient-android:4.3.5) and httpcore-4.3.3.jar (org.apache.httpcomponents:httpcore:4.3.3)
Duplicate class org.apache.http.config.MessageConstraints$Builder found in modules httpclient-android-4.3.5.jar (org.apache.httpcomponents:httpclient-android:4.3.5) and httpcore-4.3.3.jar (org.apache.httpcomponents:httpcore:4.3.3)
Duplicate class org.apache.http.config.Registry found in modules httpclient-android-4.3.5.jar (org.apache.httpcomponents:httpclient-android:4.3.5) and httpcore-4.3.3.jar (org.apache.httpcomponents:httpcore:4.3.3)
Duplicate class org.apache.http.config.RegistryBuilder found in modules httpclient-android-4.3.5.jar (org.apache.httpcomponents:httpclient-android:4.3.5) and httpcore-4.3.3.jar (org.apache.httpcomponents:httpcore:4.3.3)
Duplicate class org.apache.http.config.SocketConfig found in modules httpclient-android-4.3.5.jar (org.apache.httpcomponents:httpclient-android:4.3.5) and httpcore-4.3.3.jar (org.apache.httpcomponents:httpcore:4.3.3)
Duplicate class org.apache.http.config.SocketConfig$Builder found in modules httpclient-android-4.3.5.jar (org.apache.httpcomponents:httpclient-android:4.3.5) and httpcore-4.3.3.jar (org.apache.httpcomponents:httpcore:4.3.3)
Duplicate class org.apache.http.conn.ConnectionRequest found in modules httpclient-4.3.6.jar (org.apache.httpcomponents:httpclient:4.3.6) and httpclient-android-4.3.5.jar (org.apache.httpcomponents:httpclient-android:4.3.5)
Duplicate class org.apache.http.conn.DnsResolver found in modules httpclient-4.3.6.jar (org.apache.httpcomponents:httpclient:4.3.6) and httpclient-android-4.3.5.jar (org.apache.httpcomponents:httpclient-android:4.3.5)
Duplicate class org.apache.http.conn.HttpClientConnectionManager found in modules httpclient-4.3.6.jar (org.apache.httpcomponents:httpclient:4.3.6) and httpclient-android-4.3.5.jar (org.apache.httpcomponents:httpclient-android:4.3.5)
Duplicate class org.apache.http.conn.HttpConnectionFactory found in modules httpclient-4.3.6.jar (org.apache.httpcomponents:httpclient:4.3.6) and httpclient-android-4.3.5.jar (org.apache.httpcomponents:httpclient-android:4.3.5)
Duplicate class org.apache.http.conn.HttpInetSocketAddress found in modules httpclient-4.3.6.jar (org.apache.httpcomponents:httpclient:4.3.6) and httpclient-android-4.3.5.jar (org.apache.httpcomponents:httpclient-android:4.3.5)
Duplicate class org.apache.http.conn.HttpRoutedConnection found in modules httpclient-4.3.6.jar (org.apache.httpcomponents:httpclient:4.3.6) and httpclient-android-4.3.5.jar (org.apache.httpcomponents:httpclient-android:4.3.5)
Duplicate class org.apache.http.conn.ManagedHttpClientConnection found in modules httpclient-4.3.6.jar (org.apache.httpcomponents:httpclient:4.3.6) and httpclient-android-4.3.5.jar (org.apache.httpcomponents:httpclient-android:4.3.5)
Duplicate class org.apache.http.conn.SchemePortResolver found in modules httpclient-4.3.6.jar (org.apache.httpcomponents:httpclient:4.3.6) and httpclient-android-4.3.5.jar (org.apache.httpcomponents:httpclient-android:4.3.5)
Duplicate class org.apache.http.conn.UnsupportedSchemeException found in modules httpclient-4.3.6.jar (org.apache.httpcomponents:httpclient:4.3.6) and httpclient-android-4.3.5.jar (org.apache.httpcomponents:httpclient-android:4.3.5)
Duplicate class org.apache.http.conn.scheme.LayeredSchemeSocketFactory found in modules httpclient-4.3.6.jar (org.apache.httpcomponents:httpclient:4.3.6) and httpclient-android-4.3.5.jar (org.apache.httpcomponents:httpclient-android:4.3.5)
Duplicate class org.apache.http.conn.scheme.LayeredSocketFactoryAdaptor found in modules httpclient-4.3.6.jar (org.apache.httpcomponents:httpclient:4.3.6) and httpclient-android-4.3.5.jar (org.apache.httpcomponents:httpclient-android:4.3.5)
Duplicate class org.apache.http.conn.scheme.SchemeLayeredSocketFactory found in modules httpclient-4.3.6.jar (org.apache.httpcomponents:httpclient:4.3.6) and httpclient-android-4.3.5.jar (org.apache.httpcomponents:httpclient-android:4.3.5)
Duplicate class org.apache.http.conn.scheme.SchemeLayeredSocketFactoryAdaptor found in modules httpclient-4.3.6.jar (org.apache.httpcomponents:httpclient:4.3.6) and httpclient-android-4.3.5.jar (org.apache.httpcomponents:httpclient-android:4.3.5)
Duplicate class org.apache.http.conn.scheme.SchemeLayeredSocketFactoryAdaptor2 found in modules httpclient-4.3.6.jar (org.apache.httpcomponents:httpclient:4.3.6) and httpclient-android-4.3.5.jar (org.apache.httpcomponents:httpclient-android:4.3.5)
Duplicate class org.apache.http.conn.scheme.SchemeSocketFactory found in modules httpclient-4.3.6.jar (org.apache.httpcomponents:httpclient:4.3.6) and httpclient-android-4.3.5.jar (org.apache.httpcomponents:httpclient-android:4.3.5)
Duplicate class org.apache.http.conn.scheme.SchemeSocketFactoryAdaptor found in modules httpclient-4.3.6.jar (org.apache.httpcomponents:httpclient:4.3.6) and httpclient-android-4.3.5.jar (org.apache.httpcomponents:httpclient-android:4.3.5)
Duplicate class org.apache.http.conn.scheme.SocketFactoryAdaptor found in modules httpclient-4.3.6.jar (org.apache.httpcomponents:httpclient:4.3.6) and httpclient-android-4.3.5.jar (org.apache.httpcomponents:httpclient-android:4.3.5)
Duplicate class org.apache.http.conn.socket.ConnectionSocketFactory found in modules httpclient-4.3.6.jar (org.apache.httpcomponents:httpclient:4.3.6) and httpclient-android-4.3.5.jar (org.apache.httpcomponents:httpclient-android:4.3.5)
Duplicate class org.apache.http.conn.socket.LayeredConnectionSocketFactory found in modules httpclient-4.3.6.jar (org.apache.httpcomponents:httpclient:4.3.6) and httpclient-android-4.3.5.jar (org.apache.httpcomponents:httpclient-android:4.3.5)
Duplicate class org.apache.http.conn.socket.PlainConnectionSocketFactory found in modules httpclient-4.3.6.jar (org.apache.httpcomponents:httpclient:4.3.6) and httpclient-android-4.3.5.jar (org.apache.httpcomponents:httpclient-android:4.3.5)
Duplicate class org.apache.http.conn.ssl.PrivateKeyDetails found in modules httpclient-4.3.6.jar (org.apache.httpcomponents:httpclient:4.3.6) and httpclient-android-4.3.5.jar (org.apache.httpcomponents:httpclient-android:4.3.5)
Duplicate class org.apache.http.conn.ssl.PrivateKeyStrategy found in modules httpclient-4.3.6.jar (org.apache.httpcomponents:httpclient:4.3.6) and httpclient-android-4.3.5.jar (org.apache.httpcomponents:httpclient-android:4.3.5)
Duplicate class org.apache.http.conn.ssl.SSLConnectionSocketFactory found in modules httpclient-4.3.6.jar (org.apache.httpcomponents:httpclient:4.3.6) and httpclient-android-4.3.5.jar (org.apache.httpcomponents:httpclient-android:4.3.5)
Duplicate class org.apache.http.conn.ssl.SSLContextBuilder found in modules httpclient-4.3.6.jar (org.apache.httpcomponents:httpclient:4.3.6) and httpclient-android-4.3.5.jar (org.apache.httpcomponents:httpclient-android:4.3.5)
Duplicate class org.apache.http.conn.ssl.SSLContextBuilder$KeyManagerDelegate found in modules httpclient-4.3.6.jar (org.apache.httpcomponents:httpclient:4.3.6) and httpclient-android-4.3.5.jar (org.apache.httpcomponents:httpclient-android:4.3.5)
Duplicate class org.apache.http.conn.ssl.SSLContextBuilder$TrustManagerDelegate found in modules httpclient-4.3.6.jar (org.apache.httpcomponents:httpclient:4.3.6) and httpclient-android-4.3.5.jar (org.apache.httpcomponents:httpclient-android:4.3.5)
Duplicate class org.apache.http.conn.ssl.SSLContexts found in modules httpclient-4.3.6.jar (org.apache.httpcomponents:httpclient:4.3.6) and httpclient-android-4.3.5.jar (org.apache.httpcomponents:httpclient-android:4.3.5)
Duplicate class org.apache.http.conn.ssl.SSLInitializationException found in modules httpclient-4.3.6.jar (org.apache.httpcomponents:httpclient:4.3.6) and httpclient-android-4.3.5.jar (org.apache.httpcomponents:httpclient-android:4.3.5)
Duplicate class org.apache.http.conn.ssl.TrustSelfSignedStrategy found in modules httpclient-4.3.6.jar (org.apache.httpcomponents:httpclient:4.3.6) and httpclient-android-4.3.5.jar (org.apache.httpcomponents:httpclient-android:4.3.5)
Duplicate class org.apache.http.conn.ssl.TrustStrategy found in modules httpclient-4.3.6.jar (org.apache.httpcomponents:httpclient:4.3.6) and httpclient-android-4.3.5.jar (org.apache.httpcomponents:httpclient-android:4.3.5)
Duplicate class org.apache.http.cookie.CookieRestrictionViolationException found in modules httpclient-4.3.6.jar (org.apache.httpcomponents:httpclient:4.3.6) and httpclient-android-4.3.5.jar (org.apache.httpcomponents:httpclient-android:4.3.5)
Duplicate class org.apache.http.cookie.CookieSpecProvider found in modules httpclient-4.3.6.jar (org.apache.httpcomponents:httpclient:4.3.6) and httpclient-android-4.3.5.jar (org.apache.httpcomponents:httpclient-android:4.3.5)
Duplicate class org.apache.http.entity.ContentType found in modules httpclient-android-4.3.5.jar (org.apache.httpcomponents:httpclient-android:4.3.5) and httpcore-4.3.3.jar (org.apache.httpcomponents:httpcore:4.3.3)
Duplicate class org.apache.http.impl.BHttpConnectionBase found in modules httpclient-android-4.3.5.jar (org.apache.httpcomponents:httpclient-android:4.3.5) and httpcore-4.3.3.jar (org.apache.httpcomponents:httpcore:4.3.3)
Duplicate class org.apache.http.impl.ConnSupport found in modules httpclient-android-4.3.5.jar (org.apache.httpcomponents:httpclient-android:4.3.5) and httpcore-4.3.3.jar (org.apache.httpcomponents:httpcore:4.3.3)
Duplicate class org.apache.http.impl.DefaultBHttpClientConnection found in modules httpclient-android-4.3.5.jar (org.apache.httpcomponents:httpclient-android:4.3.5) and httpcore-4.3.3.jar (org.apache.httpcomponents:httpcore:4.3.3)
Go to the documentation to learn how to Fix dependency resolution errors.
我尝试删除build
,.gradle
,.idea
,gradle
和#.iml
文件,但每次看到
Duplicate class android.support.v4.app.INotificationSideChannel found in modules core-1.0.0-runtime.jar (androidx.core:core:1.0.0) and support-v4-21.0.3-runtime.jar (com.android.support:support-v4:21.0.3)
我不知道v4:21.0.3
依赖来自何处!我还尝试了清理项目和 Invalidate and Restart (无效并重新启动),但没有任何效果。
我的build.gradle文件是->
apply plugin: 'com.android.application'
android {
compileSdkVersion 29
buildToolsVersion "29.0.2"
useLibrary 'org.apache.http.legacy'
packagingOptions {
exclude 'META-INF/DEPENDENCIES.txt'
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/dependencies.txt'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/LICENSE'
exclude 'META-INF/license.txt'
exclude 'META-INF/LGPL2.1'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/notice.txt'
}
defaultConfig {
applicationId "com.xyz.abc"
minSdkVersion 16
targetSdkVersion 29
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
}
repositories { mavenCentral() }
dependencies {
implementation 'com.google.android.gms:play-services-base:17.1.0'
implementation 'com.google.android.gms:play-services-auth:17.0.0'
implementation 'com.google.android.gms:play-services-analytics:17.0.0'
implementation 'com.google.android.gms:play-services-plus:17.0.0'
implementation 'com.google.code.gson:gson:2.8.6'
implementation files('libs/volley.jar')
implementation 'com.facebook.android:facebook-android-sdk:4.0.0'
implementation group: 'org.apache.httpcomponents' , name: 'httpclient-android' , version: '4.3.5'
implementation (group: 'org.apache.httpcomponents' , name: 'httpmime' , version: '4.3.6') {
exclude module: 'org.apache.httpcomponents:httpclient'
}
}
和项目级别build.gradle->
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
maven {
url 'https://maven.google.com/'
name 'Google'
}
}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.3'
}
}
allprojects {
repositories {
jcenter()
maven {
url 'https://maven.google.com/'
name 'Google'
}
}
}
我完全困惑为什么那些重复类依赖错误即将到来 非常感谢您的帮助!
答案 0 :(得分:0)
尝试运行:app:dependencies
来查看依赖项的来源。
您的情况似乎是facebook-android-sdk:4.0.0正在使用android支持库
+--- com.facebook.android:facebook-android-sdk:4.0.0
| +--- com.android.support:support-v4:[21,22) -> 21.0.3
播放服务正在使用androidx库。
+--- com.google.android.gms:play-services-base:17.1.0
| +--- androidx.collection:collection:1.0.0
| | \--- androidx.annotation:annotation:1.0.0
| +--- androidx.core:core:1.0.0
要解决android / androidx冲突依赖项问题,请将android.useAndroidX=true
和android.enableJetifier=true
添加到gradle.properties中。