Moon Light Box

Time is Money

Android - Volley Build Failed in Android SDK 23

| Comments

Apache HTTP Client Removal start from Android SDK 23. So we have to add they back manually.

The org.apache.http.legacy.jar is in Android/sdk/platforms/android-23/optional and copy it to your Android project. For exmple, libs folder.

1. Modified build.gradle file with below changes.

dependency {
    compile project('libs/org.apache.http.legacy.jar')


android {
    useLibrary 'org.apache.http.legacy'

2. Modified proguard files.

Warning:library class org.apache.http.conn.scheme.LayeredSocketFactory extends or implements program class org.apache.http.conn.scheme.SocketFactory
Warning:library class android.webkit.WebView depends on program class
Warning:library class android.webkit.WebViewClient depends on program class
Warning:library class org.apache.http.params.HttpConnectionParams depends on program class org.apache.http.params.HttpParams
-keep class org.apache.http.** { *; }
-dontwarn org.apache.http.**



comments powered by Disqus