I'm trying to build a release version of the application and get apk. I receive a message in reply

Generate Signed APK Errors while building APK. You can find the errors in the 'Messages' view. 

writes in the logs here

Error: Execution failed for task ': app: transformClassesAndResourcesWithProguardForRelease'. Job failed, see logs for details

Well, and refers to the library to work with the network

 Warning:library class org.apache.http.impl.client.DefaultHttpClient depends on program class org.apache.http.params.HttpParams Warning:library class org.apache.http.impl.client.DefaultHttpClient depends on program class org.apache.http.protocol.HttpRequestExecutor Warning:library class org.apache.http.impl.client.DefaultHttpClient depends on program class org.apache.http.protocol.HttpContext Warning:library class org.apache.http.impl.client.DefaultHttpClient depends on program class org.apache.http.ConnectionReuseStrategy Warning:library class org.apache.http.impl.client.DefaultHttpClient depends on program class org.apache.http.protocol.BasicHttpProcessor Warning:there were 74 unresolved references to classes or interfaces. Warning:there were 127 instances of library classes depending on program classes. Warning:Exception while processing task java.io.IOException: Please correct the above warnings first. 

Event log

 13:43:52 Gradle build finished with 1 error(s) and 169 warning(s) in 13s 295ms 13:43:52 Build APK: Errors while building APK. You can find the errors in the 'Messages' view. 
  • one
    Messages is not your View . This is a tab in Android Studio. I do not remember where she is, but she is - Flippy
  • And what can be done with it in order to compile a normal apk file? - Heaven
  • Well .. Probably read the logs? And if you do not understand - add them a question. - Flippy
  • one
    @ SergeyGrushin updated and added logs, did not understand anything ... Google is also silent, it feels like this happens very rarely - Heaven
  • 2
    Google does not seem to be silent , yet . And not bad - vp_arth

2 answers 2

You have included a proguard for release build. Most likely you have incorrectly configured proguard.pro file.

Here about proguard

Here is a collection of rules for various popular libraries.

In your case, perhaps this set will help:

 -dontwarn org.apache.commons.** -keep class org.apache.http.** { *; } -dontwarn org.apache.http.** 
  • Strange, before this problem did not arise. And when I try to disable proguard ... android studio swears - Heaven
 release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt' signingConfig signingConfigs.config } 

In the build.gradle file, changed minifyEnabled true to minifyEnabled false and it minifyEnabled false out.