Android 7 users can't update my app, get error -504
<p>As the title states my android 7 users can't get the latest update of my app.</p>

<blockquote>
  <p><em>Note this is error <strong>-504</em></strong></p>
</blockquote>

<p>My app was built with API 22. I tried to build it with 23 and 24, get the same error with every build. It does work if I deploy app straight to phone, but not when I publish. </p>

<p>There are couple of posts with this problem and none of them seem to have definitive solution. I changed every possible thing I can and with no results.</p>

<ol>
<li>Changed every API level and build tools</li>
<li>Tried different play services</li>
<li>Added applicationId to gradle</li>
<li>Enabled multidex</li>
</ol>

<p><strong>EDIT:</strong>
This is what I get when trying to adb install:</p>

<blockquote>
  <p>Failed to install signed.apk: Failure
  [INSTALL_PARSE_FAILED_NO_CERTIFICATES: Failed to collect certificates
  from /data/app/vmdl2066131695.tmp/base.apk: META-INF/CERT.SF indicates
  /data/app/vmdl2066131695.tmp/base.apk is signed using APK Signature
  Scheme v2, but no such signature was found. Signature stripped?]</p>
</blockquote>

<p>I'll add all the posts I have found for this error:</p>

<ul>
<li><a href="https://stackoverflow.com/questions/36871439/android-users-cant-install-app-from-play-store-error-504">Android Users Can&#39;t Install App From Play Store: Error -504</a> - No solution

<ul>
<li><a href="https://stackoverflow.com/questions/34196735/google-play-error-code-504">Google Play Error code &quot;-504&quot;</a> - can be caused when downgrading play services</li>
<li><a href="https://stackoverflow.com/questions/33282246/android-app-cannot-update-from-market-after-shareduserid-added">Android app cannot update from market, after shareduserid added</a> - after adding or changing shareUserId</li>
<li><a href="https://stackoverflow.com/questions/33781210/my-newly-released-app-cant-be-installed-error-code-504">My newly released app can&#39;t be installed: Error code: -504</a> - Build tools 23.0.2 was broken</li>
</ul></li>
</ul>

<blockquote>
  <p>My dependencies:</p>
</blockquote>

<pre><code>    compile 'com.android.support:multidex:1.0.1'
compile files('src/main/libs/javax.inject-1.jar')
compile files('src/main/libs/junit-4.11.jar')
compile files('src/main/libs/hamcrest-core-1.3.jar')
compile files('src/main/libs/GeoLib.jar')
compile files('src/main/libs/GeoPolygons.jar')
compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.5'
compile files('src/main/libs/javax.annotation-3.2-b06-sources.jar')
compile ('uk.co.chrisjenx:calligraphy:2.1.0') {
    exclude group: 'com.android.support'
}
compile('com.google.android.gms:play-services:8.+') {
    exclude group: 'com.android.support'
}
compile('com.android.support:appcompat-v7:24.2.1') {
    exclude group: 'com.android.support'
}
compile('com.android.support:support-v4:24.2.1') {
    exclude group: 'com.android.support', module: 'support-annotations'
}
compile('com.android.support:palette-v7:24.2.1') {
    exclude group: 'com.android.support'
}
compile files('src/main/libs/FlurryAnalytics-6.1.0.jar')
androidTestCompile('com.android.support.test:runner:0.4.1') {
    exclude group: 'com.android.support', module: 'support-annotations'
}
androidTestCompile('com.android.support.test:rules:0.4.1') {
    exclude group: 'com.android.support', module: 'support-annotations'
}
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.1') {
    exclude group: 'com.android.support', module: 'support-annotations'
}
androidTestCompile('com.android.support.test.espresso:espresso-intents:2.2.1') {
    exclude group: 'com.android.support', module: 'support-annotations'
}
androidTestCompile('com.android.support.test.espresso:espresso-web:2.2.1') {
    exclude group: 'com.android.support', module: 'support-annotations'
}
debugCompile 'com.squareup.leakcanary:leakcanary-android:1.3.1' // or 1.4-beta1
releaseCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.3.1' // or 1.4-beta1
testCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.3.1' // or 1.4-beta1
testCompile 'junit:junit:4.11'
testCompile('org.mockito:mockito-core:1.9.5') {
    exclude group: 'org.hamcrest'
}
compile 'com.squareup:otto:1.3.5'
compile 'com.android.support:support-annotations:24.2.1'
compile 'com.google.code.findbugs:jsr305:2.0.1'
compile 'com.nineoldandroids:library:2.4.0'
compile 'pl.charmas.android:android-reactive-location:0.4@aar'
compile 'io.reactivex:rxjava:1.0.3'
compile 'com.github.castorflex.smoothprogressbar:library:1.1.0'
compile 'org.mod4j.org.apache.commons:lang:2.1.0'
compile 'com.android.support:support-v4:24.2.1'
</code></pre>