89 lines
1.8 KiB
Plaintext
89 lines
1.8 KiB
Plaintext
# Immich TV Viewer - V2.7.1 Fix Android Embedding
|
|
|
|
Projet cible :
|
|
|
|
D:\07-Logiciels\17-IMMICH-TV\immich_tv_viewer
|
|
|
|
## Base
|
|
|
|
Cette version part de la V2.7 :
|
|
|
|
- nom : Imedia Photos
|
|
- icône personnalisée
|
|
- banner TV
|
|
- vidéos avec skip des vidéos incompatibles
|
|
|
|
## Problème corrigé
|
|
|
|
Erreur :
|
|
|
|
```text
|
|
Build failed due to use of deleted Android v1 embedding.
|
|
```
|
|
|
|
Cause probable :
|
|
|
|
Le fichier AndroidManifest.xml ne déclarait plus correctement :
|
|
|
|
```xml
|
|
<meta-data
|
|
android:name="flutterEmbedding"
|
|
android:value="2" />
|
|
```
|
|
|
|
## Correction
|
|
|
|
Manifest Android restauré proprement avec :
|
|
|
|
- `android:name="${applicationName}"`
|
|
- `android:label="@string/app_name"`
|
|
- `android:icon="@mipmap/ic_launcher"`
|
|
- `android:banner="@drawable/tv_banner"`
|
|
- `android:usesCleartextTraffic="true"`
|
|
- `MainActivity`
|
|
- `LAUNCHER`
|
|
- `LEANBACK_LAUNCHER`
|
|
- `flutterEmbedding = 2`
|
|
|
|
## Fichiers modifiés / ajoutés
|
|
|
|
- android/app/src/main/AndroidManifest.xml
|
|
- android/app/src/main/res/values/strings.xml
|
|
- android/app/src/main/res/values/styles.xml
|
|
- android/app/src/main/kotlin/com/example/immich_tv_viewer/MainActivity.kt
|
|
- tools/check_android_manifest.ps1
|
|
- README_V2_7_1_FIX_ANDROID_EMBEDDING.txt
|
|
|
|
## Installation propre
|
|
|
|
```powershell
|
|
cd D:\07-Logiciels\17-IMMICH-TV\immich_tv_viewer
|
|
|
|
.\android\gradlew --stop
|
|
|
|
Remove-Item -Recurse -Force .\build -ErrorAction SilentlyContinue
|
|
Remove-Item -Recurse -Force .\android\.gradle -ErrorAction SilentlyContinue
|
|
Remove-Item -Recurse -Force .\.dart_tool -ErrorAction SilentlyContinue
|
|
|
|
flutter clean
|
|
flutter pub get
|
|
flutter run -d 192.168.1.8:5555
|
|
```
|
|
|
|
## Vérification rapide
|
|
|
|
```powershell
|
|
powershell -ExecutionPolicy Bypass -File .\tools\check_android_manifest.ps1
|
|
```
|
|
|
|
Tu dois voir :
|
|
|
|
```text
|
|
flutterEmbedding
|
|
MainActivity
|
|
LEANBACK_LAUNCHER
|
|
@string/app_name
|
|
@mipmap/ic_launcher
|
|
@drawable/tv_banner
|
|
```
|