title: android network calls not working in release build
body: <p>I'm finally ready to deploy the first release of my application but upon testing I can't perform any tasks that require network access.
  It all works just fine in debug mode and as far as I can tell the request gets sent to the correct URL but the response is always empty (message: null status:0).</p>
  
  <p>The project uses gradle and proguard so I have added this to it:</p>
  
  <pre><code>buildTypes {
      release {
          minifyEnabled true
          proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
      }
  }
  </code></pre>
  
  <p>At that point the system was warning me of some unfound class references so I added these lines to the proguard_rules.pro file:</p>
  
  <pre><code>-dontwarn com.fasterxml.**
  -dontwarn com.malinskiy.superrecyclerview.**
  -dontwarn com.octo.android.robospice.**
  -dontwarn com.squareup.**
  -dontwarn io.realm.processor.**
  -dontwarn org.joda.time.**
  -dontwarn org.springframework.http.**
  
  -keep class com.fasterxml.** { *; }
  -keep class com.malinskiy.superrecyclerview.** { *; }
  -keep class com.octo.android.robospice.** { *; }
  -keep class com.squareup.** { *; }
  -keep class io.realm.processor.** { *; }
  -keep class org.joda.time.** { *; }
  -keep class org.springframework.http.** { *; }
  </code></pre>
  
  <p>The build succeeds and the app runs fine but the moment i try to do something that requires network access it fails.</p>
  
  <p>The app doesn't crash though (error handling ftw) but it does mean that the network response listener has received a null response.</p>
  
  <p>Any idea why this is happening?</p>
  
  <p>update: it seems to be caused by the minification process (proguard). So perhaps I should start wondering why I kept getting those "class reference not found" warnings...</p>
  
  <p>if I set minifyEnabled to false the application works fine.</p>