Android : After enabling proguard org.apache.http is not working
<p>In my application, I just enable the <strong>Proguard</strong>. After enable where ever the <strong>api</strong> calling by using <strong>org.apache.http</strong> is not working.</p>

<p>My <strong>targetSDKversion is 23</strong> , so i add the library for using org.apache.htpp</p>

<p>Without proguard the release APK is working fine. But after enabling realse apk is not working fine.</p>

<p>Issue is the api is not calling fine</p>

<p>In my <strong>proguard_rule.pro</strong> </p>

<pre><code>-dontwarn org.apache.http.**
-dontwarn android.net.**
-keep class org.apache.http.** { *; }
</code></pre>

<p>After adding these three line the <strong>release apk</strong> is generated. Before that i got warning like</p>

<pre><code>Warning:library class org.apache.http.conn.scheme.LayeredSocketFactory extends or implements program class org.apache.http.conn.scheme.SocketFactory
</code></pre>

<p><strong>Gradle file</strong></p>

<pre><code> buildscript {
    repositories {
        mavenCentral()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:1.3.0'
    }
    }
    apply plugin: 'android'

    dependencies {
    compile fileTree(include: '*.jar', dir: 'libs')
    compile 'com.android.support:multidex:1.0.0'
    compile 'com.android.support:cardview-v7:21.0.+'
    compile 'com.google.android.gms:play-services-ads:7.8.0'
    compile 'com.android.support:appcompat-v7:23.1.1'
    compile('com.android.support:support-v4:21.0.3') {
        exclude module: 'support-v4'
    }
    }

    android {
    compileSdkVersion 23
    buildToolsVersion "23.0.2"
    useLibrary 'org.apache.http.legacy'


    defaultConfig {
        minSdkVersion 11
        targetSdkVersion 23

    }

    buildTypes {
        release {
            // signingConfig signingConfigs.release
            minifyEnabled true
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }

    sourceSets {
        main {
            manifest.srcFile 'AndroidManifest.xml'
            java.srcDirs = ['submodules/linphone/mediastreamer2/java/src','submodules/linphone/java/j2se','submodules/linphone/java/common','submodules/linphone/java/impl','submodules/externals/axmlrpc/src/main/java','submodules/linphone/coreapi/help/java','src']
            resources.srcDirs = ['submodules/linphone/mediastreamer2/java/src','submodules/linphone/java/j2se','submodules/linphone/java/common','submodules/linphone/java/impl','submodules/externals/axmlrpc/src/main/java','submodules/linphone/coreapi/help/java','src']
            aidl.srcDirs = ['submodules/linphone/mediastreamer2/java/src','submodules/linphone/java/j2se','submodules/linphone/java/common','submodules/linphone/java/impl','submodules/externals/axmlrpc/src/main/java','submodules/linphone/coreapi/help/java','src']
            renderscript.srcDirs = ['submodules/linphone/mediastreamer2/java/src','submodules/linphone/java/j2se','submodules/linphone/java/common','submodules/linphone/java/impl','submodules/externals/axmlrpc/src/main/java','submodules/linphone/coreapi/help/java','src']
            res.srcDirs = ['res']
            assets.srcDirs = ['assets']
            jniLibs.srcDir 'libs'

            java.exclude '**/mediastream/MediastreamerActivity.java'
        }

        instrumentTest.setRoot('tests')
        debug.setRoot('build-types/debug')
        release.setRoot('build-types/release')
    }

    dexOptions {
        javaMaxHeapSize "4g"
        preDexLibraries = false
    }

    }
</code></pre>

<p>Can anyone please help me to use <strong>org.apache.http</strong> in Proguard enabled version</p>