ankidroid / ankidroid/Anki-Android

[BUG]: FDroid: "Error installing package" for multiple versions of AnkiDroid if app data already exists

オープン
#14,216 コメント 9 件 リアクション 5 件 担当者 0 名 GitHub で見る
2.16 Bug Keep Open Priority-High Release process Reproduced
主要言語
Kotlin
スター
11.8k
フォーク
2.9k
平均マージ
2日 3時間
マージ済み PR(30日)
171

説明

### Checked for duplicates?

- [X] This issue is not a duplicate

### 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` to `storage/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:

![Screenshot_20230810-094653_F-Droid](https://github.com/ankidroid/Anki-Android/assets/15843700/d561f6eb-6513-4eb3-a0c0-3fd7bc0f67b2)

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:
- a js function I used in a deck to read all the sound files on the card in a single click didn't work anymore even after updating the paths - it worked again once I reinstalled Anki from the Github apk - I guess, the js was allowed to access the files.
- I couldn't édit in another app (Acode) the .js files from `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

```text
AnkiDroid Version = 2.16.2

Android Version = 13

ProductFlavor = full

Manufacturer = Xiaomi

Model = Redmi 7A

Hardware = qcom

Webview User Agent = Mozilla/5.0 (Linux; Android 13; Redmi 7A Build/TQ3A.230705.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/115.0.5790.166 Mobile Safari/537.36

ACRA UUID = 4ac4b3ea-fcbf-45cc-8b32-b24e7122a658

New schema = false

Scheduler = std2

Crash Reports Enabled = true

DatabaseV2 Enabled = true
```

### (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

- [X] I am reporting a bug specific to AnkiDroid (Android app)
- [X] I have checked the [manual](https://ankidroid.org/docs/manual.html) and the [FAQ](https://github.com/ankidroid/Anki-Android/wiki/FAQ) and could not find a solution to my issue
- [ ] (Optional) I have confirmed the issue is not resolved in the latest alpha release ([instructions](https://docs.ankidroid.org/manual.html#betaTesting))

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。