title: Android App crashes only with release APK
body: <p>I have a curious issue. I built an app that works fine in debug mode (direkt debugging to my phone and with debug APK installed on my phone) but the app crashes at one point if I use the release build APK.
  I found the point where the app crashes with release APK, but I don't know why and what I can do:</p>
  
  <pre><code>protected final String TABLE = "done";
  protected final String COL_ID = "_id";
  protected final String COL_TASK = "taskid";
  protected final String COL_DATE = "donedate";
  
  protected String getLastDoneDate(String id) {
      String date = "";
  
      String filter = COL_TASK + " LIKE ?";
      String[] filterArgs = new String[] {id};
      String sortOrder = COL_DATE + " DESC";
      String[] columns = new String[] {COL_DATE};
      Cursor c = MyTime.db.query(TABLE, columns, filter, filterArgs, null, null, sortOrder, "1");
      if (c.moveToFirst()) {
          date = c.getString(c.getColumnIndex(COL_DATE));
      }
      c.close();
  
      return date;
  }
  </code></pre>
  
  <p>If I remove the line Cursor c = ... (and all according to c) it works. </p>
  
  <p>Database looks like that:</p>
  
  <pre><code>CREATE TABLE IF NOT EXISTS done (
                  _id INTEGER PRIMARY KEY autoincrement,
                  taskid INTEGER,
                  donedate TEXT DEFAULT '');
  </code></pre>
  
  <p>Gradle Snippet:</p>
  
  <pre><code>buildTypes {
      release {
          shrinkResources false
          minifyEnabled true
          proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
      }
      debug {
          shrinkResources false
          minifyEnabled true
          proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
      }
  }
  </code></pre>
  
  <p>I can not debug to find the problem because the crash does'nt happen while debugging.</p>
  
  <p>Can somebody help me to solve this issue?</p>