I use this proguard file:
-dontskipnonpubliclibraryclasses
-dontskipnonpubliclibraryclassmembers
!code/simplification/arithmetic,!code/simplification/cas
It looks like the warning comes from the google library, have you tried something like that:
-dontwarn com.google.android.gms.**
-keep class com.google.android.gms.**
I would also try without the dontwarn
cause I would assume you want to be warned if there is something to be warned about!
In Eclipse find org.apache.http.legacy.jar in ..sdk/platforms/android-23/optional.
Import it like external jar, check order/export and in proguard type:
-keep class org.apache.http.** { *; }
-keepclassmembers class org.apache.http.** {*;}
-dontwarn org.apache.**
-keep class android.net.http.** { *; }
-keepclassmembers class android.net.http.** {*;}
-dontwarn android.net.**
Add following lines in your proguard file.
-keep class org.apache.http.** { *; }
-keep class org.apache.** { *; }
-dontwarn org.apache.**
-dontwarn org.apache.http.**
-dontwarn org.apache.commons.**
I had the same problem.
I found the answer here and it worked for me: How to add Apache HTTP API (legacy) as compile-time dependency to build.grade?
In your top level build.gradle file add:
buildscript {
...
dependencies {
classpath 'com.android.tools.build:gradle:1.3.1'
}
}
...
In your app-specific build.gradle file add:
android {
compileSdkVersion 23
buildToolsVersion "23.0.0"
useLibrary 'org.apache.http.legacy'
...
}
Hope it works for you! it works now with ProGuard on. I had the exact same problem as you.