Посмотрев несколько видеороликов, объясняющих, как собрать APK с помощью команды flet build, я заметил другая структура вывода.
Обычно после запуска apk flet build другие имеют следующую структуру:
| project_root
└─── build
└─── apk
└─── Release.apk
У меня совершенно другая структура (она совсем другая) обширный, поэтому при необходимости прикреплю скриншот):
| project_root
└─── сборка
└─── флаттер
| └─── андроид
| └─── приложение
| └─── ...
|
└─── site-packages
└─── Arm64-v8a (это пустой каталог)
Я нигде не смог найти файл .apk.
После запуска команды flet build apk результат был следующим:
Код: Выделить всё
Created Flutter bootstrap project from gh:flet-dev/flet-build-template with ref 0.25.1 ✅
Customized app icons and splash images ✅
[22:46:13] Generated app icons ✅
[22:46:18] Generated splash screens ✅
[22:46:50] Running package command
Extra PyPi indexes:
Creating asset directory: C:\Users\username\Desktop\Code\Python\Tests\MyApp\build\flutter\app
Created temp directory: C:\Users\username\AppData\Local\Temp\serious_python_temp2448bdf8
Copying Python app from C:\Users\username\Desktop\Code\Python\Tests\MyApp to a temp directory
Cleanup app
Configured Android/arm64-v8a platform with sitecustomize.py
Installing [-r, C:\Users\username\Desktop\Code\Python\Tests\MyApp\requirements.txt] with pip command to C:\Users\username\Desktop\Code\Python\Tests\MyApp\build\site-packages\arm64-v8a
Downloading Python distributive from https://github.com/indygreg/python-build-standalone/releases/download/20240909/cpython-3.12.6+20240909-x86_64-pc-windows-msvc-shared-install_only_stripped.tar.gz to a build directory
Extracting Python distributive
ERROR: Could not find a version that satisfies the requirement flet-desktop==0.25.1 (from versions: none)
ERROR: No matching distribution found for flet-desktop==0.25.1
Error building Flet app - see the log of failed command above.
[22:46:55] Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 3.24.5, on Microsoft Windows [Version 10.0.26100.2314], locale en-US)
[√] Windows Version (Installed version of Windows is version 10 or higher)
[√] Windows Version (Installed version of Windows is version 10 or higher)
[!] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
! Some Android licenses not accepted. To resolve this, run: flutter doctor --android-licenses
[X] Chrome - develop for the web (Cannot find Chrome executable at .\Google\Chrome\Application\chrome.exe)
! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.
[√] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.12.0)
[√] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.12.0)
[!] Android Studio (not installed)
[√] Connected device (2 available)
[√] Network resources
[√] Connected device (2 available)
[√] Network resources
[√] Network resources
! Doctor found issues in 3 categories.

Я установил Flutter SDK и добавил его в системные переменные вместе с Java SDK.
Однако в журнале отображается ошибка: «Не удалось найти версию». который удовлетворяет требованию flet-desktop==0.25.1." Когда я запускаю pip install flet-desktop==0.25.1, это означает, что все требования уже удовлетворены.
Подробнее здесь: https://stackoverflow.com/questions/792 ... e-apk-file