Initial upload: fin65-mobile
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
# FIN65 - Réparation AndroidManifest.xml
|
||||
|
||||
Ce patch répare `AndroidManifest.xml` après l'erreur :
|
||||
|
||||
```text
|
||||
Error parsing LocalFile: android/app/src/main/AndroidManifest.xml
|
||||
Please ensure that the android manifest is a valid XML document
|
||||
```
|
||||
|
||||
## Utilisation
|
||||
|
||||
Décompresse ce ZIP puis lance :
|
||||
|
||||
```powershell
|
||||
.\repair_fin65_android_manifest.bat
|
||||
```
|
||||
|
||||
Le script :
|
||||
1. sauvegarde l'ancien Manifest cassé ;
|
||||
2. réécrit un Manifest Flutter propre ;
|
||||
3. garde :
|
||||
- `android:label="FIN65"`
|
||||
- `android:icon="@mipmap/ic_launcher"`
|
||||
- `android:roundIcon="@mipmap/ic_launcher_round"`
|
||||
- `android:usesCleartextTraffic="true"`
|
||||
- permission Internet ;
|
||||
4. lance `flutter clean` et `flutter pub get`.
|
||||
|
||||
Ensuite :
|
||||
|
||||
```powershell
|
||||
cd D:\07-Logiciels\20-FIN65\fin65_mobile
|
||||
flutter run
|
||||
```
|
||||
@@ -0,0 +1,11 @@
|
||||
@echo off
|
||||
setlocal
|
||||
|
||||
echo.
|
||||
echo ==========================================
|
||||
echo FIN65 - Repair AndroidManifest.xml
|
||||
echo ==========================================
|
||||
echo.
|
||||
|
||||
powershell -NoProfile -ExecutionPolicy Bypass -File "%~dp0repair_fin65_android_manifest.ps1"
|
||||
|
||||
@@ -0,0 +1,83 @@
|
||||
$MobileDir = "D:\07-Logiciels\20-FIN65\fin65_mobile"
|
||||
$Manifest = Join-Path $MobileDir "android\app\src\main\AndroidManifest.xml"
|
||||
|
||||
Write-Host ""
|
||||
Write-Host "=========================================="
|
||||
Write-Host " FIN65 - Repair AndroidManifest.xml"
|
||||
Write-Host "=========================================="
|
||||
Write-Host ""
|
||||
|
||||
if (!(Test-Path $MobileDir)) {
|
||||
Write-Host "[ERREUR] Dossier mobile introuvable : $MobileDir" -ForegroundColor Red
|
||||
Read-Host "Appuie sur Entree pour fermer"
|
||||
exit 1
|
||||
}
|
||||
|
||||
$ManifestDir = Split-Path $Manifest -Parent
|
||||
if (!(Test-Path $ManifestDir)) {
|
||||
Write-Host "[ERREUR] Dossier Manifest introuvable : $ManifestDir" -ForegroundColor Red
|
||||
Read-Host "Appuie sur Entree pour fermer"
|
||||
exit 1
|
||||
}
|
||||
|
||||
if (Test-Path $Manifest) {
|
||||
$Stamp = Get-Date -Format "yyyyMMdd_HHmmss"
|
||||
$Backup = "$Manifest.broken_$Stamp.bak"
|
||||
Copy-Item $Manifest $Backup -Force
|
||||
Write-Host "Sauvegarde de l'ancien Manifest :"
|
||||
Write-Host $Backup
|
||||
Write-Host ""
|
||||
}
|
||||
|
||||
$Xml = @'
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
|
||||
<application
|
||||
android:label="FIN65"
|
||||
android:name="${applicationName}"
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
android:roundIcon="@mipmap/ic_launcher_round"
|
||||
android:usesCleartextTraffic="true">
|
||||
<activity
|
||||
android:name=".MainActivity"
|
||||
android:exported="true"
|
||||
android:launchMode="singleTop"
|
||||
android:taskAffinity=""
|
||||
android:theme="@style/LaunchTheme"
|
||||
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
|
||||
android:hardwareAccelerated="true"
|
||||
android:windowSoftInputMode="adjustResize">
|
||||
<meta-data
|
||||
android:name="io.flutter.embedding.android.NormalTheme"
|
||||
android:resource="@style/NormalTheme" />
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
|
||||
<meta-data
|
||||
android:name="flutterEmbedding"
|
||||
android:value="2" />
|
||||
</application>
|
||||
</manifest>
|
||||
'@
|
||||
|
||||
Set-Content -Path $Manifest -Value $Xml -Encoding UTF8
|
||||
|
||||
Write-Host "AndroidManifest.xml repare :"
|
||||
Write-Host $Manifest
|
||||
Write-Host ""
|
||||
|
||||
Set-Location $MobileDir
|
||||
|
||||
Write-Host "Verification Flutter..."
|
||||
flutter clean
|
||||
flutter pub get
|
||||
|
||||
Write-Host ""
|
||||
Write-Host "Termine. Relance maintenant :"
|
||||
Write-Host "flutter run"
|
||||
Write-Host ""
|
||||
Read-Host "Appuie sur Entree pour fermer"
|
||||
Reference in New Issue
Block a user