At the moment I am trying to setup a maven build for my existing Android application. (had been built with Ant before) While running the proguard obfuscation I am getting a lot of warnings telling me the following:
...
can't find referenced class org.apache.http.params.BasicHttpParams
can't find referenced class org.apache.http.params.BasicHttpParams
can't find referenced class org.apache.http.params.HttpConnectionParams
can't find referenced class org.apache.http.params.HttpConnectionParams
can't find referenced class org.apache.http.impl.client.DefaultHttpClient
can't find referenced class org.apache.http.impl.client.DefaultHttpClient
can't find referenced class org.apache.http.impl.client.DefaultHttpClient
can't find referenced class org.apache.http.auth.AuthScope
can't find referenced class org.apache.http.auth.AuthScope
can't find referenced class org.apache.http.auth.UsernamePasswordCredentials
...
The missing references are from the org.apache.http package. I thought that they should be included in the android.jar. I am using the android-maven-plugin version 3.2.0. The following android dependency is defined in the pom.xml.
<dependency>
<groupId>android</groupId>
<artifactId>android</artifactId>
<version>4.0.3_r3</version>
<scope>provided</scope>
</dependency>
I have installed the Android dependencies with the maven-android-sdk-deployer.
What is the correct solution for this kind of error? Without obfuscation the build is successful and the resulting APK works perfectly fine. I haven't changed the proguard config file. (it worked in combination with ant)