bug: `flet build` fails on rebuild

Cerrado
#7,010 0 comentarios 0 reacciones 1 asignado Ver en GitHub

Los mantenedores suelen responder en 1 día

@ndonkoHenri ya está trabajando en esto.

Desde el 27/10/2026.

  • #7012 de @ndonkoHenri — fusionado

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
55/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
flutter, python

Línea de trabajo

Start by tracing how flet build prepares and cleans build/flutter-packages and how the generated Flutter project records extension package paths; the issue names no source files or tests. Reproduce by building an Android project with the listed extensions twice without changing dependencies, then inspect the second build's Flutter dependency resolution. Done when the second build succeeds with the extensions installed.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

bug
Duplicate Check
Describe the bug

After a successful flet build apk, running flet build again (without changing
dependencies) can fail during "Running build hooks" because the generated Flutter
project still depends on an extension package from build\flutter-packages\, but that
folder no longer exists at that point.

Error:

Running build hooks...Because *** depends on flet_onesignal from path which
doesn't exist (could not find package flet_onesignal at
"D:\***\***\build\flutter-packages\flet_onesignal"), version solving failed.

The folder build\flutter-packages does not exist on disk after the failure.
The extension's Python package (flet-onesignal) is installed and was bundled
successfully in the earlier build.

Code sample
Code
Running build hooks...Because *** depends on flet_onesignal from path which
doesn't exist (could not find package flet_onesignal at
"D:\***\***\build\flutter-packages\flet_onesignal"), version solving failed.
To reproduce
  1. Project using Flet 1.0.5 with the extensions flet-map, flet-geolocator and
    flet-onesignal, built for Android.
  2. Run flet build apk — it succeeds.
  3. Without changing pyproject.toml, run flet build for Android again.
  4. The build stops at the Flutter dependency resolution step with the error above.
  5. Deleting the whole build folder before the next run avoids the error [confirm].
Expected behavior

No response

Screenshots / Videos
Captures

[Upload media here]

Operating System

Windows

Operating system details

11

Flet version

1.0.5

Regression

No, it isn't

Suggestions

No response

Logs
Logs
[Paste your logs here]
Additional details

No response

Lenguaje dominante
Python
Estrellas
17.5k
Forks
740
Merge medio
1 d 11 h
PR fusionados (30 d)
75

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de flet-dev/flet

Todos los issues de flet-dev/flet

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.