Android 7 用户无法更新我的应用程序,出现错误 -504

标签 android google-play

正如标题所述,我的 android 7 用户无法获得我的应用程序的最新更新。

Note this is error -504

我的应用程序是使用 API 22 构建的。我尝试使用 23 和 24 构建它,每次构建都遇到相同的错误。如果我将应用程序直接部署到手机上,它确实有效,但在我发布时却没有。

有几个帖子有这个问题,但似乎都没有明确的解决方案。我改变了所有可能的事情,但没有结果。

  1. 更改了每个 API 级别和构建工具
  2. 尝试过不同的播放服务
  3. 将 applicationId 添加到 gradle
  4. 启用多dex

编辑: 这是我在尝试 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?]

我将添加我为这个错误找到的所有帖子:

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'

最佳答案

为了将来引用,我设法解决了这个问题。问题出在新的签名系统上。我做了手动签名和对齐。在您可以签署您的应用程序然后对其进行 zipalign 之前。对于新的 Android 版本,它将失败。签名应该是最后一件事。

关于Android 7 用户无法更新我的应用程序,出现错误 -504,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39973775/

相关文章:

java - Android 应用程序中的 setOnClickListener 错误

java - 在webview中使用Android 4.4.4上传文件

android - Android 应用的 Google Analytics v3 中缺少跟踪 ID (&id) 参数

启用 Jacoco 时,具有默认方法的 Java 8 接口(interface)不起作用

android - Google 内部应用共享 - 意外错误

java - 如何计算android中上传/下载数据大小?

android - 我可以从 alpha 测试 channel 获得较低版本的代码吗

Android应用内结算: How to remove published item from product list?

android - Google Play 应用发布问题

android - 有没有办法检查安装我的应用程序的用户是否真的安装了我的应用程序?