Fix Android release build and verify on emulator
- Disable Kotlin incremental compilation (kotlin.incremental=false): the project lives on D: while Gradle's Kotlin daemon caches default to C:, which crashes with "this and base files have different roots" when closing incremental caches. - Drop flutter_map_tile_caching for now: it pins objectbox_flutter_libs ^4.1.0, which fails checkReleaseAarMetadata against newer AndroidX transitive deps (needs compileSdk 34+, itself built against android-31). Not used in code yet, so deferred rather than forcing an unverified dependency_override. - Add web/ platform for fast local UI iteration without an emulator. - Ignore .claude/ (Claude Code session state, not project content). Verified: flutter analyze, flutter test, and a real release build running on a newly created Pixel_10a-profile Android emulator (API 36). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5
parent
346fcc2183
commit
ac14ad4c4c
@@ -1,3 +1,5 @@
|
||||
.claude/
|
||||
|
||||
test/flutter_test_project/.gitignore
|
||||
test/flutter_test_project/.metadata
|
||||
test/flutter_test_project/analysis_options.yaml
|
||||
|
||||
@@ -60,10 +60,19 @@ dart run build_runner build
|
||||
(im `app/`-Verzeichnis; `--delete-conflicting-outputs` wird von der installierten
|
||||
build_runner-Version ignoriert und ist nicht nötig).
|
||||
|
||||
**Entschiedene Pakete** (siehe Doku Abschnitt 8): `flutter_map` + `flutter_map_tile_caching`
|
||||
(nicht `google_maps_flutter`), `drift`, `flutter_bloc` + `flutter_riverpod` (kombiniert:
|
||||
Bloc für die App-Mode State Machine, Riverpod für reaktive Einzelwerte wie Telemetrie),
|
||||
`go_router`.
|
||||
**Entschiedene Pakete** (siehe Doku Abschnitt 8): `flutter_map` (nicht `google_maps_flutter`),
|
||||
`drift`, `flutter_bloc` + `flutter_riverpod` (kombiniert: Bloc für die App-Mode State
|
||||
Machine, Riverpod für reaktive Einzelwerte wie Telemetrie), `go_router`.
|
||||
|
||||
**`flutter_map_tile_caching` (FMTC, Doku 4.18) ist aktuell NICHT in der pubspec** —
|
||||
FMTC 10.1.1 pinnt `objectbox_flutter_libs: ^4.1.0` fest, und diese Version hat einen
|
||||
AAR-Metadata-Konflikt mit neueren AndroidX-Transitiv-Dependencies (`androidx.fragment`,
|
||||
`androidx.window`, `androidx.activity` verlangen compileSdk ≥34, `objectbox_flutter_libs`
|
||||
selbst ist gegen android-31 kompiliert) → Build schlägt fehl
|
||||
(`checkReleaseAarMetadata`). Da FMTC im Code noch nirgends verwendet wird, wurde es
|
||||
vorerst entfernt statt mit ungetesteten `dependency_overrides` zu forcieren. Vor
|
||||
erneutem Hinzufügen: prüfen, ob FMTC eine neuere Version mit `objectbox_flutter_libs ^5.x`
|
||||
freigegeben hat.
|
||||
|
||||
**Noch nicht umgesetzt / bewusst zurückgestellt:**
|
||||
- Eigener MSP-Encoder/Decoder in Dart (4.19) — kein fertiges Paket verfügbar.
|
||||
@@ -71,8 +80,25 @@ Bloc für die App-Mode State Machine, Riverpod für reaktive Einzelwerte wie Tel
|
||||
Protokoll-Adapter zu verifizieren.
|
||||
- `SurveyAreaMission`/`SearchAreaMission` (Strategy-Pattern vorgesehen, Details offen).
|
||||
- Foreground Service (Android) für Hintergrund-Telemetrie (4.20).
|
||||
- Offline-Kartenkachel-Caching (FMTC, siehe oben) — Paket-Versionskonflikt zu lösen.
|
||||
- `flutter_launcher_icons` ist konfiguriert für Android; iOS ist aus MVP-Gründen
|
||||
deaktiviert (`ios: false` in der `flutter_launcher_icons`-Sektion der `pubspec.yaml`).
|
||||
- `web/`-Plattform ist nur für schnelle lokale UI-Vorschau hinzugefügt (kein Android-
|
||||
Emulator/Gerät nötig), nicht Teil des Release-Scopes.
|
||||
|
||||
## Bekannte Windows-Stolpersteine beim Android-Build
|
||||
|
||||
- **Projekt liegt auf D:, Gradle-/Kotlin-Nutzerverzeichnis auf C:** → Kotlins
|
||||
inkrementeller Compiler crasht beim Schließen der Caches
|
||||
(`Could not close incremental caches ... this and base files have different roots`).
|
||||
Fix bereits gesetzt: `kotlin.incremental=false` in `android/gradle.properties`.
|
||||
- **`flutter run -d <emulator-id> --release`** ist der zuverlässigste Weg, einen
|
||||
Android-Emulator/Gerät aus diesem (nicht-interaktiven) Environment heraus zu
|
||||
bespielen — Debug-Modus mit Hot-Reload funktioniert nur in einer echten
|
||||
interaktiven Session (VS Code, Terminal).
|
||||
- **`adb shell`/`adb pull` mit absoluten Unix-Pfaden (`/sdcard/...`) in Git Bash**:
|
||||
MSYS wandelt den führenden Slash-Pfad fälschlich in einen Windows-Pfad um. Fix:
|
||||
Pfad mit doppeltem Slash schreiben (`//sdcard/datei.png`).
|
||||
|
||||
## Verifikation nach Änderungen
|
||||
|
||||
@@ -81,3 +107,11 @@ Im `app/`-Verzeichnis:
|
||||
flutter analyze
|
||||
flutter test
|
||||
```
|
||||
|
||||
Für einen echten Lauf auf Android (z. B. Emulator `Pixel_10a`, angelegt mit dem
|
||||
`pixel_10`-Geräteprofil als Näherung, da kein exaktes "Pixel 10a"-Profil im SDK
|
||||
existiert):
|
||||
```
|
||||
flutter emulators --launch Pixel_10a
|
||||
flutter run -d emulator-5554 --release
|
||||
```
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@ migration:
|
||||
- platform: root
|
||||
create_revision: 058e0af2c2b57e369d905a03ac9748b0ebf543c6
|
||||
base_revision: 058e0af2c2b57e369d905a03ac9748b0ebf543c6
|
||||
- platform: android
|
||||
- platform: web
|
||||
create_revision: 058e0af2c2b57e369d905a03ac9748b0ebf543c6
|
||||
base_revision: 058e0af2c2b57e369d905a03ac9748b0ebf543c6
|
||||
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
org.gradle.jvmargs=-Xmx8G -XX:MaxMetaspaceSize=4G -XX:ReservedCodeCacheSize=512m -XX:+HeapDumpOnOutOfMemoryError
|
||||
android.useAndroidX=true
|
||||
# Projekt liegt auf D:, Gradle/Kotlin-Nutzerverzeichnis standardmaessig auf C: -
|
||||
# Kotlins inkrementeller Compiler bricht beim Schliessen der Caches ab, wenn
|
||||
# Projekt- und Cache-Pfad auf unterschiedlichen Laufwerken liegen ("this and
|
||||
# base files have different roots"). Inkrementelle Kotlin-Kompilierung daher
|
||||
# deaktiviert (etwas langsamere Rebuilds, aber stabil).
|
||||
kotlin.incremental=false
|
||||
# This newDsl flag was added by the Flutter template
|
||||
android.newDsl=false
|
||||
# This builtInKotlin flag was added by the Flutter template
|
||||
|
||||
@@ -273,14 +273,6 @@ packages:
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.1.1"
|
||||
flat_buffers:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: flat_buffers
|
||||
sha256: "380bdcba5664a718bfd4ea20a45d39e13684f5318fcd8883066a55e21f37f4c3"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "23.5.26"
|
||||
flutter:
|
||||
dependency: "direct main"
|
||||
description: flutter
|
||||
@@ -318,14 +310,6 @@ packages:
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "8.3.1"
|
||||
flutter_map_tile_caching:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: flutter_map_tile_caching
|
||||
sha256: "90e097223d8ab74425cf15b449a03adfa4d4c28406dc757e1c396aff0f9beba7"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "10.1.1"
|
||||
flutter_riverpod:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
@@ -576,22 +560,6 @@ packages:
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.0.2"
|
||||
objectbox:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: objectbox
|
||||
sha256: "3cc186749178a3556e1020c9082d0897d0f9ecbdefcc27320e65c5bc650f0e57"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "4.3.1"
|
||||
objectbox_flutter_libs:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: objectbox_flutter_libs
|
||||
sha256: cd754766e04229a4f51250f121813d9a3c1a74fc21cd68e48b3c6085cbcd6c85
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "4.3.1"
|
||||
objective_c:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
||||
@@ -42,7 +42,6 @@ dependencies:
|
||||
cupertino_icons: ^1.0.8
|
||||
flutter_map: ^8.3.1
|
||||
latlong2: ^0.9.1
|
||||
flutter_map_tile_caching: ^10.1.1
|
||||
drift: ^2.34.2
|
||||
sqlite3_flutter_libs: ^0.6.0+eol
|
||||
path_provider: ^2.1.6
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 917 B |
Binary file not shown.
|
After Width: | Height: | Size: 5.2 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 8.1 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 5.5 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 20 KiB |
@@ -0,0 +1,46 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<!--
|
||||
If you are serving your web app in a path other than the root, change the
|
||||
href value below to reflect the base path you are serving from.
|
||||
|
||||
The path provided below has to start and end with a slash "/" in order for
|
||||
it to work correctly.
|
||||
|
||||
For more details:
|
||||
* https://developer.mozilla.org/en-US/docs/Web/HTML/Element/base
|
||||
|
||||
This is a placeholder for base href that will be replaced by the value of
|
||||
the `--base-href` argument provided to `flutter build`.
|
||||
-->
|
||||
<base href="$FLUTTER_BASE_HREF">
|
||||
|
||||
<meta charset="UTF-8">
|
||||
<meta content="IE=Edge" http-equiv="X-UA-Compatible">
|
||||
<meta name="description" content="A new Flutter project.">
|
||||
|
||||
<!-- iOS meta tags & icons -->
|
||||
<meta name="mobile-web-app-capable" content="yes">
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
||||
<meta name="apple-mobile-web-app-title" content="dmc_app">
|
||||
<link rel="apple-touch-icon" href="icons/Icon-192.png">
|
||||
|
||||
<!-- Favicon -->
|
||||
<link rel="icon" type="image/png" href="favicon.png"/>
|
||||
|
||||
<title>dmc_app</title>
|
||||
<link rel="manifest" href="manifest.json">
|
||||
</head>
|
||||
<body>
|
||||
<!--
|
||||
You can customize the "flutter_bootstrap.js" script.
|
||||
This is useful to provide a custom configuration to the Flutter loader
|
||||
or to give the user feedback during the initialization process.
|
||||
|
||||
For more details:
|
||||
* https://docs.flutter.dev/platform-integration/web/initialization
|
||||
-->
|
||||
<script src="flutter_bootstrap.js" async></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,35 @@
|
||||
{
|
||||
"name": "dmc_app",
|
||||
"short_name": "dmc_app",
|
||||
"start_url": ".",
|
||||
"display": "standalone",
|
||||
"background_color": "#0175C2",
|
||||
"theme_color": "#0175C2",
|
||||
"description": "A new Flutter project.",
|
||||
"orientation": "portrait-primary",
|
||||
"prefer_related_applications": false,
|
||||
"icons": [
|
||||
{
|
||||
"src": "icons/Icon-192.png",
|
||||
"sizes": "192x192",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "icons/Icon-512.png",
|
||||
"sizes": "512x512",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "icons/Icon-maskable-192.png",
|
||||
"sizes": "192x192",
|
||||
"type": "image/png",
|
||||
"purpose": "maskable"
|
||||
},
|
||||
{
|
||||
"src": "icons/Icon-maskable-512.png",
|
||||
"sizes": "512x512",
|
||||
"type": "image/png",
|
||||
"purpose": "maskable"
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user