3

As the title states my android 7 users can't get the latest update of my app.

Note this is error -504

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.

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.

  1. Changed every API level and build tools
  2. Tried different play services
  3. Added applicationId to gradle
  4. Enabled multidex

EDIT: This is what I get when trying to adb install:

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?]

I'll add all the posts I have found for this error:

My dependencies:

    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'
Community
  • 1
  • 1
somerandomusername
  • 1,993
  • 4
  • 23
  • 55

1 Answers1

4

For future reference I managed to fix this. Problem was with new signing system. I did manual signing and aligning. Before you could sign your app and then zipalign it. It will fail for new Android version. Signing should be the last thing.

somerandomusername
  • 1,993
  • 4
  • 23
  • 55
  • 1
    Thanks for the great info! Can you give more details on how to do the manual "sign and align"? – BarryBostwick Nov 01 '16 at 20:55
  • yes, can you give more information? I tried using v2SigningEnabled false in the signing configuration in gradle, but then I zipaligned it. It didn't work. So I have to build the release apk and then zipaligned it and finally sign it? – mthandr Nov 02 '16 at 00:50
  • @BarryBostwick by "I did manual signing and aligning" I mean that I used to do it manually, so I signed and then aligned it in console on my own. But it turns out you can't do anything AFTER signing. Signing should be the last thing you do or it wont work on new API level. I just disabled v2 signing and generated signed app using android studio signing tool. – somerandomusername Nov 02 '16 at 11:16
  • God sent! This works. I just generated the signed apk via Android Studio, and didn't do any of the manual process via the CLI as I used to, solved it for me. – Christoffer Johansen Feb 01 '17 at 01:35