jberkel/android-plugin — Issue #111: If apache http classes are referenced, they should be stripped in proguard
Author: geeksville
Created: 2012-01-27 17:01:39+00:00
State: open

Because the android runtime includes classes with the same names (and likely same functionality). Here's the way I fixed it for just my project:

(from my SBT Build.scala)

// The following packages should be excluded from android builds
proguardExclude in Android <<= (proguardExclude in Android, fullClasspath in Runtime) map { (inherited, cp_) =>
val cp: PathFinder = cp_.files
val excluded =
(cp ** "httpclient-*.jar") +++
(cp ** "httpcore-*.jar") +++
(cp ** "commons-logging-*.jar") +++
(cp ** "commons-io-*.jar") get

inherited ++ excluded
}