Java 替换/覆盖android sdk的类

Java 替换/覆盖android sdk的类,java,android,dex,apache-httpcomponents,Java,Android,Dex,Apache Httpcomponents,我对Android下的编译感到困惑 我有一个使用这些依赖项的库: compile('org.apache.httpcomponents:httpmime:4.3') { exclude module: 'httpclient' } //we need the org.apache.http.entity.ContentType class compile('org.apache.httpcomponents:httpcore:4.3') 我的误解是,它编译并似乎运行正常,但我预计

我对Android下的编译感到困惑

我有一个使用这些依赖项的库:

compile('org.apache.httpcomponents:httpmime:4.3') { 
    exclude module: 'httpclient'
}
//we need the org.apache.http.entity.ContentType class
compile('org.apache.httpcomponents:httpcore:4.3')  
我的误解是,它编译并似乎运行正常,但我预计会出现编译错误,因为: Android SDK包含许多与
httpcore

以下是我的问题:

  • 为什么没有
    意外的顶级异常:
    java.lang.IllegalArgumentException:已添加:…
    编译期间
  • 如何知道在运行时使用的是哪个版本的重复类
我正在使用构建工具19:

    buildToolsVersion "19.1.0"
    compileSdkVersion 15
    defaultConfig {
        minSdkVersion 15
        targetSdkVersion 15
    }

使用Android官方版而不是股票版

谢谢。我知道。。。但这并不能真正回答问题。