Do one of the following:
Error: Cannot install app. Error code in Play Store is: -504.
Can anyone reproduce this? Any ideas?
Can you try 2.12.0 from github?
What kind of device is it? Smartphone, tablet,...?
Thank you for the reply! This APK fails as well as installation. Telekom Puls is a tablet (added above).
Do you have multiple users on the tablet?
No (the tablet does not even support this afaik)
From: mueller-ma notifications@github.com
Sent: Monday, March 23, 2020 7:49:26 PM
To: openhab/openhab-android openhab-android@noreply.github.com
Cc: Christoph Thiede christoph.thiede@outlook.de; Author author@noreply.github.com
Subject: Re: [openhab/openhab-android] Cannot install app on Android 5 (error -504) (#1876)
Do you have multiple users on the tablet?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://eur04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fopenhab%2Fopenhab-android%2Fissues%2F1876%23issuecomment-602789099&data=02%7C01%7C%7C1f3696a493c04aabc30408d7cf5ae9d2%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637205861674984080&sdata=xgDCgDgKa5sWOzAie7rlngNxoc4%2Fc%2FX1m0kcK73ZX7s%3D&reserved=0, or unsubscribehttps://eur04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAJH4PSTUHTIN2AHENW5PW23RI6VLNANCNFSM4LRMCETA&data=02%7C01%7C%7C1f3696a493c04aabc30408d7cf5ae9d2%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637205861674994084&sdata=Wwdps7KLEp0xvA5u8b1BjaMTrHwfsUTJGXBYvClM8sc%3D&reserved=0.
Did you try to install it over adb?
I'm closing this issue as I don't think it's the apk that causes the issue.
Did you try to install it over adb?
What's the simplest way to do so?
Sorry, the issue still persists:
$ adb install '.\openhab-android.apk'
Performing Push Install
.\openhab-android.apk: 1 file pushed, 0 skipped. 4.1 MB/s (9979134 bytes in 2.314s)
pkg: /data/local/tmp/openhab-android.apk
Failure [INSTALL_FAILED_DEXOPT]
What error details should I collect and how? :)
Can you post the output of 'adb logcat' after that attempt? Googling for that error suggests there are different potential reasons for this, among which are disk space issues or issues in the tooling we use to build the app.
Can you post the output of 'adb logcat' after that attempt?
That command does never terminate (I have been waiting a few hours). The output file is dozens of MBs large and contains sensitive information. How can I extract the relevant logs?
Just
Ah, that's good to know :)
Here is what I found:
W/PackageParser(26461): Problem in package /data/local/tmp/openhab-android.apk:
W/PackageParser(26461): Unknown element under <activity>: layout at /data/local/tmp/openhab-android.apk Binary XML file line #103
...
W/PackageManager(23117): Package org.openhab.habdroid desires unavailable shared library org.apache.http.legacy; ignoring!
...
I/PackageManager(23117): Perform pre-dex opt for package: org.openhab.habdroid
I/art (23117): DexFile_isDexOptNeeded failed to open oat file '/data/dalvik-cache/arm/data@[email protected]@[email protected]' for file location '/data/app/org.openhab.habdroid-1/base.apk': Failed to open oat filename for reading: No such file or directory
...
W/PackageManager(23117): Package couldn't be installed in /data/app/org.openhab.habdroid-1
W/PackageManager(23117): com.android.server.pm.PackageManagerException: scanPackageLI
W/PackageManager(23117): at com.android.server.pm.PackageManagerService.scanPackageDirtyLI(PackageManagerService.java:6309)
W/PackageManager(23117): at com.android.server.pm.PackageManagerService.scanPackageLI(PackageManagerService.java:5615)
W/PackageManager(23117): at com.android.server.pm.PackageManagerService.installNewPackageLI(PackageManagerService.java:10744)
W/PackageManager(23117): at com.android.server.pm.PackageManagerService.installPackageLI(PackageManagerService.java:11299)
W/PackageManager(23117): at com.android.server.pm.PackageManagerService.access$2800(PackageManagerService.java:243)
W/PackageManager(23117): at com.android.server.pm.PackageManagerService$6.run(PackageManagerService.java:9193)
W/PackageManager(23117): at android.os.Handler.handleCallback(Handler.java:815)
W/PackageManager(23117): at android.os.Handler.dispatchMessage(Handler.java:104)
W/PackageManager(23117): at android.os.Looper.loop(Looper.java:194)
W/PackageManager(23117): at android.os.HandlerThread.run(HandlerThread.java:61)
W/PackageManager(23117): at com.android.server.ServiceThread.run(ServiceThread.java:46)
I/PackageManager(23117): Installation done for package: null
Does this include the relevant errors? Otherwise, I will have to through the whole 1.5 MB file to remove all private information.
Yes, that's the relevant part, thanks. Now we 'just' need to make sense of it ... it doesn't obviously make sense to me. I'll google around a bit.
Edit: did you cut that output (visible via the ellipsis)? Are you sure there's nothing related between the 'failed to open oat file' message and the next one after ellipsis? Anything that has 'Package' in its tag might be related.