I have built a release APK of my app.
If I try to install it from Play Store I get Error -504. Users have also reported to have the same problem.
I was able to catch logcat from the failure:
04-18 10:22:41.487 3713-3713/? I/Finsky: [1] com.google.android.finsky.download.DownloadBroadcastReceiver.a(45): Intent received at DownloadBroadcastReceiver
04-18 10:22:41.505 3713-3713/? I/Finsky: [1] com.google.android.finsky.download.x.b(404): com.faendir.kepi.vpviewer: onProgress 1842784/1842784 Status: 200.
04-18 10:22:41.507 3713-3713/? I/Finsky: [1] com.google.android.finsky.download.e.a(244): com.faendir.kepi.vpviewer from 2 to 3.
04-18 10:22:41.519 3713-3713/? I/Finsky: [1] com.google.android.finsky.download.x.b(603): com.faendir.kepi.vpviewer: onComplete
04-18 10:22:41.523 3713-3713/? I/Finsky: [1] com.google.android.finsky.download.x.i(344): Download com.faendir.kepi.vpviewer removed from DownloadQueue
04-18 10:22:41.524 308-308/? I/installd: free_cache(0) avail 1213521920
04-18 10:22:41.525 3713-3713/? I/Finsky: [1] com.google.android.finsky.receivers.v.c(24906): Prepare to copy com.faendir.kepi.vpviewer (com.faendir.kepi.vpviewer) from content://downloads/my_downloads/2469 (expect 1842784 bytes, isGzipped: false)
04-18 10:22:41.657 3713-3764/? I/Finsky: [8067] com.google.android.finsky.receivers.y.a(2959): com.faendir.kepi.vpviewer (com.faendir.kepi.vpviewer) (1842784 bytes) copied successfully in 116 ms
04-18 10:22:41.762 3713-3713/? I/Finsky: [1] com.google.android.finsky.receivers.y.onPostExecute(4040): Successfully copied APK to update com.faendir.kepi.vpviewer (com.faendir.kepi.vpviewer)
04-18 10:22:41.763 3713-3713/? I/Finsky: [1] com.google.android.finsky.receivers.v.c(28120): Begin install of com.faendir.kepi.vpviewer
[ 04-18 10:22:41.782 1102: 1159 W/ ]
Zip: missed a central dir sig (at 0)
04-18 10:22:41.782 1102-1159/? W/zipro: Error opening archive /data/app/vmdl2071847660.tmp/com.faendir.kepi.vpviewer: Iteration ended
04-18 10:22:41.782 1102-1159/? D/asset: failed to open Zip archive '/data/app/vmdl2071847660.tmp/com.faendir.kepi.vpviewer'
04-18 10:22:41.791 1102-1159/? E/PackageInstaller: Commit of session 2071847660 failed: Failed to parse /data/app/vmdl2071847660.tmp/com.faendir.kepi.vpviewer
04-18 10:22:41.816 3713-3713/? E/Finsky: [1] com.google.android.finsky.installer.x.onReceive(2496): Error -504 while installing com.faendir.kepi.vpviewer: INSTALL_PARSE_FAILED_NOT_APK: Failed to parse /data/app/vmdl2071847660.tmp/com.faendir.kepi.vpviewer
04-18 10:22:41.816 3713-3713/? W/Finsky: [1] com.google.android.finsky.receivers.ah.a(2152): Install failure of com.faendir.kepi.vpviewer: -504 null
04-18 10:22:41.823 3713-3713/? I/Finsky: [1] com.google.android.finsky.receivers.v.a(766): Cancel running installation of com.faendir.kepi.vpviewer (com.faendir.kepi.vpviewer)
Does anyone know what could cause this?
Note 1: If I install the APK from external storage it works without problem.
Note 2: I have seen this question, and this is not the problem.
Note 3: Google doesn't give anything useful when searching for INSTALL_PARSE_FAILED_NOT_APK
, which seems to be the core problem to me.