Android security issues for release

I can create assemblies for my Android application, but when I turn on proguard, I get numouos warnings and then the assembly fails. The warnings are as follows:

Warning: library class android.net.http.AndroidHttpClient depends on program class org.apache.http.HttpRequest Warning: library class android.net.http.AndroidHttpClient depends on program class org.apache.http.HttpEntity Warning: library class android.net.http.AndroidHttpClient depends on program class org.apache.http.params.HttpParams Warning: library class android.net.http.AndroidHttpClient depends on program class org.apache.http.conn.ClientConnectionManager Warning: library class android.net.http.AndroidHttpClient depends on program class org.apache.http.client.methods.HttpUriRequest Warning: library class android.net.http.AndroidHttpClient depends on program class org.apache.http.HttpResponse Warning: library class android.net.http.AndroidHttpClient depends on program class org.apache.http.client.methods.HttpUriRequest Warning: library class android.net.http.AndroidHttpClient depends on program class org.apache.http.protocol.HttpContext Warning: library class android.net.http.AndroidHttpClient depends on program class org.apache.http.HttpResponse Warning: library class android.net.http.AndroidHttpClient depends on program class org.apache.http.HttpHost Warning: library class android.net.http.AndroidHttpClient depends on program class org.apache.http.HttpRequest Warning: library class android.net.http.AndroidHttpClient depends on program class org.apache.http.HttpResponse Warning: library class android.net.http.AndroidHttpClient depends on program class org.apache.http.HttpHost Warning: library class android.net.http.AndroidHttpClient depends on program class org.apache.http.HttpRequest Warning: library class android.net.http.AndroidHttpClient depends on program class org.apache.http.protocol.HttpContext Warning: library class android.net.http.AndroidHttpClient depends on program class org.apache.http.HttpResponse Warning: library class android.net.http.AndroidHttpClient depends on program class org.apache.http.client.methods.HttpUriRequest Warning: library class android.net.http.AndroidHttpClient depends on program class org.apache.http.client.ResponseHandler Warning: library class android.net.http.AndroidHttpClient depends on program class org.apache.http.client.methods.HttpUriRequest Warning: library class android.net.http.AndroidHttpClient depends on program class org.apache.http.client.ResponseHandler Warning: library class android.net.http.AndroidHttpClient depends on program class org.apache.http.protocol.HttpContext Warning: library class android.net.http.AndroidHttpClient depends on program class org.apache.http.HttpHost Warning: library class android.net.http.AndroidHttpClient depends on program class org.apache.http.HttpRequest Warning: library class android.net.http.AndroidHttpClient depends on program class org.apache.http.client.ResponseHandler Warning: library class android.net.http.AndroidHttpClient depends on program class org.apache.http.HttpHost Warning: library class android.net.http.AndroidHttpClient depends on program class org.apache.http.HttpRequest Warning: library class android.net.http.AndroidHttpClient depends on program class org.apache.http.client.ResponseHandler Warning: library class android.net.http.AndroidHttpClient depends on program class org.apache.http.protocol.HttpContext Warning: library class android.net.http.AndroidHttpClient depends on program class org.apache.http.entity.AbstractHttpEntity 

He complains about the libraries that were used in my project. My settings are below:

 buildTypes { release { runProguard false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt' proguardFile file('proguard-rules.txt') signingConfig signingConfigs.release } } 

In my proguard-rules.txt , I have the following:

 -libraryjars libs 

All my libraries are stored in the libs folder. Is there anything else I'm doing wrong?

+5
source share
2 answers

check banks by creating a list of packages in your libs.

Then try adding the following for these packages to the list in the proguard configuration file:

 -dontwarn org.codehaus.jackson.** ... -keep class org.codehaus.jackson.** { *; } 
+4
source

Your libraries contain duplicate android.http classes that are already present in the Android runtime. This can lead to conflicts. You must remove duplicate libraries from your project.

See the ProGuard manual> Troubleshooting> Warning: the library class ... depends on the class of the program ...

0
source

Source: https://habr.com/ru/post/1201011/


All Articles