-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG]: FDroid: "Error installing package" for multiple versions of AnkiDroid if app data already exists #14216
Comments
This issue can be reproduced on Android 12: Motorola e32(s). Exactly the same problem. The .apk from Github works correctly (AnkiDroid-2.16.2-arm64-v8a.apk) |
@ApprobationBW : which version of the apk from github did you install? |
TL;DR: Reproduction Steps:
==== Workarounds ( 1.
2.
Old content==== I've tried to reproduce:
I get the following in my logcat:
Reproduced the error message
FoxyDroid gives:
==== I fixed this by installing from the Play Store, uninstalling + wiping data, then installing from F-Droid This is reproducible |
Anki-Android/AnkiDroid/build.gradle Line 69 in 9d5a6ae
Anki-Android/AnkiDroid/build.gradle Lines 188 to 213 in 9d5a6ae
|
Interesting! I just got home from traveling since July 2 (!) And FDroid distribution is my first goal for ankidroid as I get moving again. I don't see why we can't have the full version of 2.16 use the top version code so that FDroid can install over it as we get 2.16 rolled out there. I'll look through the other related items... For context we only just hit around 50% adoption via play store of 2.16 and the release has been a real bear to get released, so please have a little patience while we get everything releasing smoothly in all channels like 2.15... |
AnkiDroid-2.16.2-arm64-v8a.apk |
we do ABI splits using versions that are either the number 1, 2, 3 or 4 (depending on which ABI we are building) multiplied by 100000000 and added to the base version code. So going from an ABI split to a universal build (which is what F-droid uses) will always look like a downgrade. A quick fix would be to alter the build script in f-droid to add 400000000 to it. This is not great though, as it will just cause problems later when/if f-droid does ABI splits for ankidroid. I submit that f-droid should do ABI splits so I think the real solution is to pursue the solution hinted at in the related issue here: https://gitlab.com/fdroid/fdroiddata/-/issues/3047 It doesn't look that hard, just adding stanzas to the script, I think? |
This comment was marked as outdated.
This comment was marked as outdated.
Just ran into this issue with Anki 2.17. Previously installed Anki through Play Store, uninstall and keep data led to the abovementioned error when trying to install from F Droid. Reinstall through Playstore and then uninstall with "keep data" unchecked worked like mentioned in the first post. Thanks! |
Checked for duplicates?
What are the steps to reproduce this bug?
After migrating my phone from Android 10 to Android 13, I had to move the Ankidroid folder from
/storage/emulated/0/AnkiDroid
tostorage/emulated/0/Android/data/com.ichi2.anki/files/AnkiDroid
but this caused several problems*. So, I decided to uninstall Anki and reinstalled it from f-droid. But I got this error:I was able to install Ankidroid from Github but I had to use the "arm64-V8A" version otherwise I also got an error "App not installed as package appears to be invalid". **
For information, when I was on Android 10, I first installed Ankidroid via the Play Store, then I used several alpha versions of the "armeabi-v7a.apk", and recently the app was automatically updated by Play Store to 2.16. On Android 10 and with Anki 2.16, I was still able to use the
/storage/emulated/0/AnkiDroid
folder It's only when I migrated to Android 13 that I had to use the app data path.In brief, I guess the version on F-droid doesn't include all the versions of the apk.
(*) For example:
storage/emulated/0/Android/data/com.ichi2.anki/files/AnkiDroid
(**)Also, it's strange that I had to use the "arm64-V8A" version as I always used the "armeabi-v7a" before for the alpha updates (I kept the same smartphone).
Expected behaviour
Being able to install AnkiDroid via F-droid
Actual behaviour
Unable to install the app (cf printscreen above).
Debug info
(Optional) Anything else you want to share?
On F-droid there is a warning "This app has features you may not like. Learn more! [...] This app promotes or depends entirely on a non-free network service".
Research
The text was updated successfully, but these errors were encountered: