Flet `--build apk` command not working in version `0.25.x`
Duplicate Check
- [X] I have searched the opened issues and there are no duplicates
Describe the bug
/home/runner/.pub-cache/hosted/pub.dev/file_picker-8.1.5/android/src/main/java/com/mr/flutter/plugin/filepicker/FilePickerPlugin.java:257: error: cannot find symbol if (registrar != null) { ^ symbol: variable registrar location: class FilePickerPlugin /home/runner/.pub-cache/hosted/pub.dev/file_picker-8.1.5/android/src/main/java/com/mr/flutter/plugin/filepicker/FilePickerPlugin.java:260: error: cannot find symbol registrar.addActivityResultListener(this.delegate); ^ symbol: variable registrar location: class FilePickerPlugin 2 errors 3 warnings
FAILURE: Build failed with an exception.
- What went wrong: Execution failed for task ':file_picker:compileReleaseJavaWithJavac'.
Compilation failed; see the compiler error output for details.
Code sample
Code
[Paste your code here]
To reproduce
No, Details
Expected behavior
No response
Screenshots / Videos
Captures
[Upload media here]
Operating System
Linux
Operating system details
ubuntu-latest
Flet version
0.25.0
Regression
Yes, it used to work in a previous Flet version (please specify the version in additional details)
Suggestions
No response
Logs
Logs
╔════════════════════════════════════════════════════════════════════════════╗
║ Welcome to Flutter! - https://flutter.dev/ ║
║ ║
║ The Flutter tool uses Google Analytics to anonymously report feature usage ║
║ statistics and basic crash reports. This data is used to help improve ║
║ Flutter tools over time. ║
║ ║
║ Flutter tool analytics are not sent on the very first run. To disable ║
║ reporting, type 'flutter config --no-analytics'. To display the current ║
║ setting, type 'flutter config'. If you opt out of analytics, an opt-out ║
║ event will be sent, and then no further information will be sent by the ║
║ Flutter tool. ║
║ ║
║ By downloading the Flutter SDK, you agree to the Google Terms of Service. ║
║ The Google Privacy Policy describes how data is handled in this service. ║
║ ║
║ Moreover, Flutter includes the Dart SDK, which may send usage metrics and ║
║ crash reports to Google. ║
║ ║
║ Read about data we send with crash reports: ║
║ https://flutter.dev/to/crash-reporting ║
║ ║
║ See Google's privacy policy: ║
║ https://policies.google.com/privacy ║
║ ║
║ To disable animations in this tool, use ║
║ 'flutter config --no-cli-animations'. ║
╚════════════════════════════════════════════════════════════════════════════╝
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.24.3, on Ubuntu 24.04.1 LTS 6.8.0-1017-azure, locale C.UTF-8)
[✓] Android toolchain - develop for Android devices (Android SDK version 35.0.0)
[✓] Chrome - develop for the web
[✓] Linux toolchain - develop for Linux desktop
[!] Android Studio (not installed)
[✓] Connected device (2 available)
[✓] Network resources
! Doctor found issues in 1 category.
Analytics reporting disabled.
You may need to restart any open editors for them to read new settings.
[15:37:50] Additional Flutter dependencies: {'flet_lottie': 'any'}
Created Flutter bootstrap project from
gh:flet-dev/flet-build-template with ref 0.25.1 ✅
Copying /home/runner/work/ynet/ynet/src/assets/icon.png to
/home/runner/work/ynet/ynet/build/flutter/images
Customized app icons and splash images ✅
Run subprocess:
['/opt/hostedtoolcache/flutter/stable-3.24.3-x64/bin/cache/dart-sdk/b
in/dart', 'run', 'flutter_launcher_icons']
════════════════════════════════════════════
FLUTTER LAUNCHER ICONS (v0.14.2)
════════════════════════════════════════════
• Creating default icons Android
• Overwriting the default Android launcher icon with a new icon
• Creating adaptive icons Android
• No colors.xml file found in your Android project
• Creating colors.xml file and adding it to your Android project
• Creating mipmap xml file Android
• Overwriting default iOS launcher icon with new icon
Creating Icons for Web...
Creating Icons for Windows...
Creating Icons for MacOS...
✓ Successfully generated launcher icons
[15:38:03] Generated app icons ✅
Run subprocess:
['/opt/hostedtoolcache/flutter/stable-3.24.3-x64/bin/cache/dart-sdk/b
in/dart', 'run', 'flutter_native_splash:create']
[Android] Creating default splash images
[Android] Creating dark mode splash images
[Android] Creating default android12splash images
[Android] Creating dark mode android12splash images
[Android] Updating launch background(s) with splash image path...
[Android] - android/app/src/main/res/drawable/launch_background.xml
[Android] - android/app/src/main/res/drawable-night/launch_background.xml
[Android] - android/app/src/main/res/drawable-v21/launch_background.xml
[Android] - android/app/src/main/res/drawable-night-v21/launch_background.xml
[Android] Updating styles...
[Android] - android/app/src/main/res/values-v31/styles.xml
[Android] No android/app/src/main/res/values-v31/styles.xml found in your Android project
[Android] Creating android/app/src/main/res/values-v31/styles.xml and adding it to your Android project
[Android] - android/app/src/main/res/values-night-v31/styles.xml
[Android] No android/app/src/main/res/values-night-v31/styles.xml found in your Android project
[Android] Creating android/app/src/main/res/values-night-v31/styles.xml and adding it to your Android project
[Android] - android/app/src/main/res/values/styles.xml
[Android] - android/app/src/main/res/values-night/styles.xml
[iOS] Creating images
[iOS] Creating dark mode images
[iOS] Updating ios/Runner/Info.plist for status bar hidden/visible
[Web] Creating images
[Web] Creating images
[Web] Creating background images
[Web] Creating CSS
[Web] Updating index.html
✅ Native splash complete.
Now go finish building something awesome! 💪 You rock! 🤘🤩
Like the package? Please give it a 👍 here: https://pub.dev/packages/flutter_native_splash
[15:38:09] Generated splash screens ✅
Run subprocess:
['/opt/hostedtoolcache/flutter/stable-3.24.3-x64/bin/cache/dart-sdk/b
in/dart', 'run', 'serious_python:main', 'package',
'/home/runner/work/ynet/ynet/src', '--platform', 'Android', '--arch',
'arm64-v8a', '--requirements',
'bs4==0.0.2,flet==0.25.0,humanize==4.10.0,pydal==20241201.2,requests=
=2.32.3', '--exclude', 'build', '--compile-app', '--cleanup']
Running package command
Extra PyPi indexes: [https://pypi.flet.dev/]
Creating asset directory: /home/runner/work/ynet/ynet/build/flutter/app
Created temp directory: /tmp/serious_python_tempTTUGRM
Copying Python app from /home/runner/work/ynet/ynet/src to a temp directory
Compiling Python sources in a temp directory
Downloading Python distributive from https://github.com/indygreg/python-build-standalone/releases/download/20240909/cpython-3.12.6+20240909-x86_64-unknown-linux-gnu-install_only_stripped.tar.gz to a build directory
Extracting Python distributive
Cleanup app
Configured Android/arm64-v8a platform with sitecustomize.py
Installing [bs4==0.0.2, flet==0.25.0, humanize==4.10.0, pydal==20241201.2, requests==2.32.3] with pip command to /home/runner/work/ynet/ynet/build/site-packages/arm64-v8a
Cleanup installed packages
Creating app archive at /home/runner/work/ynet/ynet/build/flutter/app/app.zip from a temp directory
Writing app archive hash to /home/runner/work/ynet/ynet/build/flutter/app/app.zip.hash
Deleting temp directory
[15:38:17] Packaged Python app ✅
Run subprocess:
['/opt/hostedtoolcache/flutter/stable-3.24.3-x64/bin/flutter',
'build', 'apk', '--split-per-abi', '--build-number', '1734101761',
'--build-name', '12.0.0']
Resolving dependencies...
Downloading packages...
archive 3.6.1 (4.0.1 available)
characters 1.3.0 (1.4.0 available)
clock 1.1.1 (1.1.2 available)
collection 1.18.0 (1.19.1 available)
flutter_lints 2.0.3 (5.0.0 available)
http_parser 4.0.2 (4.1.1 available)
image 4.3.0 (4.4.0 available)
intl 0.19.0 (0.20.1 available)
js 0.6.7 (0.7.1 available)
lints 2.1.1 (5.1.0 available)
lottie 3.2.0 (3.3.0 available)
material_color_utilities 0.11.1 (0.12.0 available)
meta 1.15.0 (1.16.0 available)
path 1.9.0 (1.9.1 available)
sensors_plus 4.0.2 (6.1.1 available)
sensors_plus_platform_interface 1.2.0 (2.0.1 available)
serious_python 0.8.3 (0.8.4 available)
shelf 1.4.1 (1.4.2 available)
toml 0.15.0 (0.16.0 available)
url_strategy 0.2.0 (discontinued)
! wakelock_plus 1.2.8 (overridden)
! web 1.1.0 (overridden)
web_socket_channel 2.4.5 (3.0.1 available)
! window_manager 0.4.3 (overridden)
Got dependencies!
1 package is discontinued.
21 packages have newer versions incompatible with dependency constraints.
Try `flutter pub outdated` for more information.
Running Gradle task 'assembleRelease'...
Warning: Errors during XML parse:
Warning: Additionally, the fallback loader failed to parse the XML.
Checking the license for package NDK (Side by side) 25.1.8937393 in /usr/local/lib/android/sdk/licenses
License for package NDK (Side by side) 25.1.8937393 accepted.
Preparing "Install NDK (Side by side) 25.1.8937393 v.25.1.8937393".
"Install NDK (Side by side) 25.1.8937393 v.25.1.8937393" ready.
Installing NDK (Side by side) 25.1.8937393 in /usr/local/lib/android/sdk/ndk/25.1.8937393
"Install NDK (Side by side) 25.1.8937393 v.25.1.8937393" complete.
"Install NDK (Side by side) 25.1.8937393 v.25.1.8937393" finished.
Checking the license for package Android SDK Platform 31 in /usr/local/lib/android/sdk/licenses
License for package Android SDK Platform 31 accepted.
Preparing "Install Android SDK Platform 31 (revision 1)".
"Install Android SDK Platform 31 (revision 1)" ready.
Installing Android SDK Platform 31 in /usr/local/lib/android/sdk/platforms/android-31
"Install Android SDK Platform 31 (revision 1)" complete.
"Install Android SDK Platform 31 (revision 1)" finished.
Checking the license for package Android SDK Platform 33 in /usr/local/lib/android/sdk/licenses
License for package Android SDK Platform 33 accepted.
Preparing "Install Android SDK Platform 33 (revision 3)".
"Install Android SDK Platform 33 (revision 3)" ready.
Installing Android SDK Platform 33 in /usr/local/lib/android/sdk/platforms/android-33
"Install Android SDK Platform 33 (revision 3)" complete.
"Install Android SDK Platform 33 (revision 3)" finished.
Font asset "CupertinoIcons.ttf" was tree-shaken, reducing it from 257628 to 209160 bytes (18.8% reduction). Tree-shaking can be disabled by providing the --no-tree-shake-icons flag when building your app.
Font asset "MaterialIcons-Regular.otf" was tree-shaken, reducing it from 1645184 to 1261080 bytes (23.3% reduction). Tree-shaking can be disabled by providing the --no-tree-shake-icons flag when building your app.
warning: [options] source value 8 is obsolete and will be removed in a future release
warning: [options] target value 8 is obsolete and will be removed in a future release
warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.
/home/runner/.pub-cache/hosted/pub.dev/file_picker-8.1.5/android/src/main/java/com/mr/flutter/plugin/filepicker/FilePickerPlugin.java:257: error: cannot find symbol
if (registrar != null) {
^
symbol: variable registrar
location: class FilePickerPlugin
/home/runner/.pub-cache/hosted/pub.dev/file_picker-8.1.5/android/src/main/java/com/mr/flutter/plugin/filepicker/FilePickerPlugin.java:260: error: cannot find symbol
registrar.addActivityResultListener(this.delegate);
^
symbol: variable registrar
location: class FilePickerPlugin
2 errors
3 warnings
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':file_picker:compileReleaseJavaWithJavac'.
> Compilation failed; see the compiler error output for details.
* Try:
> Run with --info option to get more log output.
> Run with --scan to get full insights.
BUILD FAILED in 6m 22s
Running Gradle task 'assembleRelease'... 383.6s
Gradle task assembleRelease failed with exit code 1
[15:44:43] Error building Flet app - see the log of failed command above.
Run subprocess:
['/opt/hostedtoolcache/flutter/stable-3.24.3-x64/bin/flutter',
'--version']
Run subprocess:
['/opt/hostedtoolcache/flutter/stable-3.24.3-x64/bin/flutter',
'doctor']
[15:44:46] Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.24.3, on Ubuntu 24.04.1 LTS
6.8.0-1017-azure, locale C.UTF-8)
[✓] Android toolchain - develop for Android devices (Android SDK
version 35.0.0)
[✓] Chrome - develop for the web
[✓] Linux toolchain - develop for Linux desktop
[!] Android Studio (not installed)
[✓] Connected device (2 available)
[✓] Network resources
! Doctor found issues in 1 category.
Error: Process completed with exit code 1.
Additional details
The last version I used that flet --build was working is = 0.24.1
The commands I used to build the flet app
flutter doctor
flutter config --no-analytics
flet build apk \
--verbose \
--split-per-abi \
--compile-app \
--cleanup-on-compile \
--android-adaptive-icon-background="#ffffff" \
--include-packages flet_lottie \
--build-number="$BUILD_NUMBER" \
--build-version="$BUILD_VERSION" \
--company="$COMPANY_NAME" \
--org="$ORG_NAME" \
--product="$PRODUCT" \
--description="$DESCRIPTION" \
--project="$PROJECT" \
--arch=arm64-v8a
I'm getting the same filepicker package error with flet 25.1. can't build APK or AAB
I was compiling normal but I updated the flutter and when compiling I get that same filepicker error on mac how could it be fixed
Luckily I'm not the only one, I didn't know what the hell to do anymore. After updating flutter, flet build apk doesn't work on versions "0.24.1", "0.25.0", "0.25.1" or "0.25.2". I tried downgrading flutter (directly reinstalling everything from flutter to android studio with new variables) but it didn't work. I also tried repairing the dependency versions from pyproject.toml using [tool.flet.flutter.pubspec.dependencies] and [tool.flet.flutter.pubspec.dependency_overrides] but this didn't work for me either.
Add these lines to your pyproject.toml file
[tool.flet.flutter.pubspec.dependency_overrides] file_picker = "8.1.4"
Add these lines to your pyproject.toml file
[tool.flet.flutter.pubspec.dependency_overrides] file_picker = "8.1.4"
It's working, thanks :)
From my side the problem persists. The FilePicker thing luckily doesn't come up, but there is a problem with CardTheme. I'm attaching it, if necessary, I'll open a new Issue.
Context:
-Development on Windows 11, in vscode
-Flutter 3.27.0
-Poetry 1.8.3
-Flet versions tested with poetry run flet build apk --verbose that give the same error mentioned --> 0.24.1 | 0.25.0 | 0.25.1 | 0.25.2
pyproject.toml: `[virtualenvs] create = true in-project = true
[tool.poetry] name = "xxxxxxxxxx" version = "0.1.0" description = "" authors = ["XXXXXXXX"] readme = "README.md"
[tool.poetry.dependencies] python = "^3.11" flet = "0.25.0" python-dotenv = "1.0.1" requests = "2.32.3"
[build-system] requires = ["poetry-core"] build-backend = "poetry.core.masonry.api"
[project] name = "xxxxxxxx" version = "0.1.0" description = "xxxxxxxxx." authors = [ {name = "xxxxxxxxxxxxxxx"} ]
[tool.flet] org = "com.XXXXXXX" # --org product = "XXXXXXX" # --product package = "com.XXXXXXX.XXXXXX" company = "XXXX" # --company copyright = "Copyright (C) 2024 by XXXXXX" # --copyright
permissions = ["microphone"] # --permissions
flutter.dependencies = ["flet_audio"] # --include-packages
[tool.flet.flutter.pubspec.dependency_overrides] file_picker = "8.1.4"
[tool.flet.flutter.pubspec.environment] sdk = ">=3.3.0 <3.14.0"`
Log output:
(manifestapp-py3.11) PS D:\Usuarios\Alejandro\Documents\GitHub\manifestapp> poetry run flet build apk --verbose
Installing flet-cli 0.25.0 package...OK
[17:31:38] Additional Flutter dependencies: {'flet_audio': 'any'}
[17:31:41] Created Flutter bootstrap project from gh:flet-dev/flet-build-template with ref 0.25.0 ✅
Customized app icons and splash images ✅
Run subprocess: ['C:\\flutter_3.24.0\\flutter\\bin\\dart.BAT', 'run', 'flutter_launcher_icons']
( ● ) Generating app icons ⏳... Resolving dependencies in D:\Usuarios\Alejandro\Documents\GitHub\manifestapp\build\flutter..( ● ) Generating app icons (2.4s)
( ● ) Generating app icons ⏳...
Got dependencies in D:\Usuarios\Alejandro\Documents\GitHub\manifestapp\build\flutter`.
(● ) Generating app icons (2.7s)
Built flutter_launcher_icons:flutter_launcher_icons.
( ●) Generating app icons ⏳... ════════════════════════════════════════════
FLUTTER LAUNCHER ICONS (v0.14.2)
════════════════════════════════════════════
( ● ) Generating app icons ⏳... • Creating default icons Android ( ● ) Generating app icons ⏳... • Overwriting the default Android launcher icon with a new icon ( ● ) Generating app icons ⏳... • Creating adaptive icons Android ( ● ) Generating app icons ⏳... • No colors.xml file found in your Android project • Creating colors.xml file and adding it to your Android project • Creating mipmap xml file Android ( ● ) Generating app icons ⏳... • Overwriting default iOS launcher icon with new icon ( ● ) Generating app icons ⏳... Creating Icons for Web... ( ● ) Generating app icons ⏳... Creating Icons for Windows... (● ) Generating app icons ⏳... Creating Icons for MacOS... ( ● ) Generating app icons ⏳... ✓ Successfully generated launcher icons [17:31:50] Generated app icons ✅ Run subprocess: ['C:\flutter_3.24.0\flutter\bin\dart.BAT', 'run', 'flutter_native_splash:create'] ( ● ) Generating splash screens (3.5s) Built flutter_native_splash:create. ( ● ) Generating splash screens ⏳... [Android] Creating default splash images (● ) Generating splash screens ⏳... [Android] Creating dark mode splash images ( ● ) Generating splash screens ⏳... [Android] Creating default android12splash images ( ● ) Generating splash screens ⏳... [Android] Creating dark mode android12splash images ( ● ) Generating splash screens ⏳... [Android] Updating launch background(s) with splash image path... [Android] - android/app/src/main/res/drawable/launch_background.xml ( ● ) Generating splash screens ⏳... [Android] - android/app/src/main/res/drawable-night/launch_background.xml [Android] - android/app/src/main/res/drawable-v21/launch_background.xml [Android] - android/app/src/main/res/drawable-night-v21/launch_background.xml [Android] Updating styles... [Android] - android/app/src/main/res/values-v31/styles.xml [Android] No android/app/src/main/res/values-v31/styles.xml found in your Android project [Android] Creating android/app/src/main/res/values-v31/styles.xml and adding it to your Android project ( ● ) Generating splash screens ⏳... [Android] - android/app/src/main/res/values-night-v31/styles.xml [Android] No android/app/src/main/res/values-night-v31/styles.xml found in your Android project [Android] Creating android/app/src/main/res/values-night-v31/styles.xml and adding it to your Android project [Android] - android/app/src/main/res/values/styles.xml [Android] - android/app/src/main/res/values-night/styles.xml [iOS] Creating images ( ● ) Generating splash screens ⏳... [iOS] Creating dark mode images ( ● ) Generating splash screens ⏳... [iOS] Updating ios/Runner/Info.plist for status bar hidden/visible ( ● ) Generating splash screens ⏳... [Web] Creating images ( ● ) Generating splash screens ⏳... [Web] Creating images ( ● ) Generating splash screens ⏳... [Web] Creating background images [Web] Creating CSS ( ● ) Generating splash screens ⏳... [Web] Updating index.html
✅ Native splash complete. Now go finish building something awesome! 💪 You rock! 🤘🤩 Like the package? Please give it a 👍 here: https://pub.dev/packages/flutter_native_splash
[17:32:00] Generated splash screens ✅
Run subprocess: ['C:\flutter_3.24.0\flutter\bin\dart.BAT', 'run', 'serious_python:main', 'package',
'D:\Usuarios\Alejandro\Documents\GitHub\manifestapp', '--platform', 'Android', '--requirements',
'flet==0.25.0,python-dotenv==1.0.1,requests==2.32.3', '--exclude', 'build', '--cleanup']
( ●) Packaging Python app (1.2s)
Built serious_python:main.
( ● ) Packaging Python app ⏳... Running package command
Extra PyPi indexes: [https://pypi.flet.dev]
Creating asset directory: D:\Usuarios\Alejandro\Documents\GitHub\manifestapp\build\flutter\app
Created temp directory: C:\Users\ALEJAN~1\AppData\Local\Temp\serious_python_tempa36c90f6
Copying Python app from D:\Usuarios\Alejandro\Documents\GitHub\manifestapp to a temp directory
( ●) Packaging Python app ⏳... Cleanup app
( ● ) Packaging Python app ⏳... Configured Android/arm64-v8a platform with sitecustomize.py
Installing [flet==0.25.0, python-dotenv==1.0.1, requests==2.32.3] with pip command to D:\Usuarios\Alejandro\Documents\GitHub\manifestapp\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
( ● ) Packaging Python app ⏳... Extracting Python distributive
( ●) Packaging Python app ⏳... Cleanup installed packages
( ● ) Packaging Python app ⏳... Configured Android/armeabi-v7a platform with sitecustomize.py
Installing [flet==0.25.0, python-dotenv==1.0.1, requests==2.32.3] with pip command to D:\Usuarios\Alejandro\Documents\GitHub\manifestapp\build\site-packages\armeabi-v7a
( ● ) Packaging Python app ⏳... Cleanup installed packages
( ● ) Packaging Python app ⏳... Configured Android/x86_64 platform with sitecustomize.py
Installing [flet==0.25.0, python-dotenv==1.0.1, requests==2.32.3] with pip command to D:\Usuarios\Alejandro\Documents\GitHub\manifestapp\build\site-packages\x86_64
( ● ) Packaging Python app ⏳... Cleanup installed packages
( ● ) Packaging Python app ⏳... Configured Android/x86 platform with sitecustomize.py
Installing [flet==0.25.0, python-dotenv==1.0.1, requests==2.32.3] with pip command to D:\Usuarios\Alejandro\Documents\GitHub\manifestapp\build\site-packages\x86
( ● ) Packaging Python app ⏳... Cleanup installed packages
( ● ) Packaging Python app ⏳... Creating app archive at D:\Usuarios\Alejandro\Documents\GitHub\manifestapp\build\flutter\app/app.zip from a temp directory
( ● ) Packaging Python app ⏳... Writing app archive hash to D:\Usuarios\Alejandro\Documents\GitHub\manifestapp\build\flutter\app/app.zip.hash
(● ) Packaging Python app ⏳... Deleting temp directory
[17:33:52] Packaged Python app ✅
Run subprocess: ['C:\flutter_3.24.0\flutter\bin\flutter.BAT', 'build', 'apk', '--build-name', '0.1.0']
( ● ) Building .apk for Android ⏳... (1.1s)
( ● ) Building .apk for Android ⏳...
( ● ) Building .apk for Android ⏳... archive 3.6.1 (4.0.1 available)
audioplayers 5.2.1 (6.1.0 available)
audioplayers_android 4.0.3 (5.0.0 available)
audioplayers_darwin 5.0.2 (6.0.0 available)
audioplayers_linux 3.1.0 (4.0.0 available)
audioplayers_platform_interface 6.1.0 (7.0.0 available)
audioplayers_web 4.1.0 (5.0.1 available)
audioplayers_windows 3.1.0 (4.0.0 available)
characters 1.3.0 (1.4.0 available)
clock 1.1.1 (1.1.2 available)
collection 1.19.0 (1.19.1 available)
! file_picker 8.1.4 (overridden) (8.1.5 available)
flet 0.25.1 (0.25.2 available)
flet_audio 0.25.1 (0.25.2 available)
flutter_lints 2.0.3 (5.0.0 available)
image 4.3.0 (4.4.0 available)
intl 0.19.0 (0.20.1 available)
js 0.6.7 (0.7.1 available)
lints 2.1.1 (5.1.0 available)
material_color_utilities 0.11.1 (0.12.0 available)
meta 1.15.0 (1.16.0 available)
path 1.9.0 (1.9.1 available)
sensors_plus 4.0.2 (6.1.1 available)
sensors_plus_platform_interface 1.2.0 (2.0.1 available)
serious_python 0.8.2 (0.8.4 available)
toml 0.15.0 (0.16.0 available)
url_strategy 0.2.0 (discontinued)
! wakelock_plus 1.2.8 (overridden)
! web 1.1.0 (overridden)
web_socket_channel 2.4.5 (3.0.1 available)
! window_manager 0.4.3 (overridden)
Got dependencies!
1 package is discontinued.
28 packages have newer versions incompatible with dependency constraints.
Try flutter pub outdated for more information.
( ● ) Building .apk for Android ⏳...
/C:/Users/Alejandro/AppData/Local/Pub/Cache/hosted/pub.dev/flet-0.25.1/lib/src/utils/theme.dart:356:28: Error: A value of type 'TabBarThemeData' can't be returned from a function with return type 'TabBarTheme?'.
- 'TabBarThemeData' is from 'package:flutter/src/material/tab_bar_theme.dart' ('/C:/flutter_3.24.0/flutter/packages/flutter/lib/src/material/tab_bar_theme.dart').
- 'TabBarTheme' is from 'package:flutter/src/material/tab_bar_theme.dart' ('/C:/flutter_3.24.0/flutter/packages/flutter/lib/src/material/tab_bar_theme.dart'). return theme.tabBarTheme.copyWith( ^ ( ●) Building .apk for Android ⏳... /C:/Users/Alejandro/AppData/Local/Pub/Cache/hosted/pub.dev/flet-0.25.1/lib/src/utils/theme.dart:438:28: Error: A value of type 'DialogThemeData' can't be returned from a function with return type 'DialogTheme?'.
- 'DialogThemeData' is from 'package:flutter/src/material/dialog_theme.dart' ('/C:/flutter_3.24.0/flutter/packages/flutter/lib/src/material/dialog_theme.dart').
- 'DialogTheme' is from 'package:flutter/src/material/dialog_theme.dart' ('/C:/flutter_3.24.0/flutter/packages/flutter/lib/src/material/dialog_theme.dart'). return theme.dialogTheme.copyWith( ^ /C:/Users/Alejandro/AppData/Local/Pub/Cache/hosted/pub.dev/flet-0.25.1/lib/src/utils/theme.dart:482:26: Error: A value of type 'CardThemeData' can't be returned from a function with return type 'CardTheme?'.
- 'CardThemeData' is from 'package:flutter/src/material/card_theme.dart' ('/C:/flutter_3.24.0/flutter/packages/flutter/lib/src/material/card_theme.dart').
- 'CardTheme' is from 'package:flutter/src/material/card_theme.dart' ('/C:/flutter_3.24.0/flutter/packages/flutter/lib/src/material/card_theme.dart'). return theme.cardTheme.copyWith( ^ Target kernel_snapshot_program failed: Exception
FAILURE: Build failed with an exception.
-
What went wrong: Execution failed for task ':app:compileFlutterBuildRelease'. ( ●) Building .apk for Android ⏳... > Process 'command 'C:\flutter_3.24.0\flutter\bin\flutter.bat'' finished with non-zero exit value 1
-
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights. Get more help at https://help.gradle.org.
BUILD FAILED in 37s ( ● ) Building .apk for Androi 38,9s ( ● ) Building .apk for Android ⏳... Gradle task assembleRelease failed with exit code 1 [17:34:37] Error building Flet app - see the log of failed command above. Run subprocess: ['C:\flutter_3.24.0\flutter\bin\flutter.BAT', '--version'] [17:34:38] Run subprocess: ['C:\flutter_3.24.0\flutter\bin\flutter.BAT', 'doctor'] [17:34:48] Doctor summary (to see all details, run flutter doctor -v): [√] Flutter (Channel stable, 3.27.0, on Microsoft Windows [Versi¢n 10.0.22631.4602], locale es-AR) [√] Windows Version (Installed version of Windows is version 10 or higher) [√] Android toolchain - develop for Android devices (Android SDK version 35.0.0) [√] Chrome - develop for the web [√] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.11.0) [√] Android Studio (version 2024.2) [√] VS Code (version 1.96.0) [√] Connected device (3 available) [√] Network resources
• No issues found!`
From my side the problem persists. The FilePicker thing luckily doesn't come up, but there is a problem with CardTheme. I'm attaching it, if necessary, I'll open a new Issue.
Context: -Development on Windows 11, in vscode -Flutter 3.27.0 -Poetry 1.8.3 -Flet versions tested with
poetry run flet build apk --verbosethat give the same error mentioned -->0.24.1|0.25.0|0.25.1|0.25.2pyproject.toml: `[virtualenvs] create = true in-project = true
[tool.poetry] name = "xxxxxxxxxx" version = "0.1.0" description = "" authors = ["XXXXXXXX"] readme = "README.md"
[tool.poetry.dependencies] python = "^3.11" flet = "0.25.0" python-dotenv = "1.0.1" requests = "2.32.3"
[build-system] requires = ["poetry-core"] build-backend = "poetry.core.masonry.api"
[project] name = "xxxxxxxx" version = "0.1.0" description = "xxxxxxxxx." authors = [ {name = "xxxxxxxxxxxxxxx"} ]
[tool.flet] org = "com.XXXXXXX" # --org product = "XXXXXXX" # --product package = "com.XXXXXXX.XXXXXX" company = "XXXX" # --company copyright = "Copyright (C) 2024 by XXXXXX" # --copyright
permissions = ["microphone"] # --permissions
flutter.dependencies = ["flet_audio"] # --include-packages
[tool.flet.flutter.pubspec.dependency_overrides] file_picker = "8.1.4"
[tool.flet.flutter.pubspec.environment] sdk = ">=3.3.0 <3.14.0"`
Log output:
(manifestapp-py3.11) PS D:\Usuarios\Alejandro\Documents\GitHub\manifestapp> poetry run flet build apk --verbose Installing flet-cli 0.25.0 package...OK [17:31:38] Additional Flutter dependencies: {'flet_audio': 'any'} [17:31:41] Created Flutter bootstrap project from gh:flet-dev/flet-build-template with ref 0.25.0 ✅ Customized app icons and splash images ✅ Run subprocess: ['C:\\flutter_3.24.0\\flutter\\bin\\dart.BAT', 'run', 'flutter_launcher_icons'] ( ● ) Generating app icons ⏳... Resolving dependencies inD:\Usuarios\Alejandro\Documents\GitHub\manifestapp\build\flutter..( ● ) Generating app icons (2.4s) ( ● ) Generating app icons ⏳... Got dependencies inD:\Usuarios\Alejandro\Documents\GitHub\manifestapp\build\flutter`. (● ) Generating app icons (2.7s) Built flutter_launcher_icons:flutter_launcher_icons. ( ●) Generating app icons ⏳... ════════════════════════════════════════════ FLUTTER LAUNCHER ICONS (v0.14.2) ════════════════════════════════════════════( ● ) Generating app icons ⏳... • Creating default icons Android ( ● ) Generating app icons ⏳... • Overwriting the default Android launcher icon with a new icon ( ● ) Generating app icons ⏳... • Creating adaptive icons Android ( ● ) Generating app icons ⏳... • No colors.xml file found in your Android project • Creating colors.xml file and adding it to your Android project • Creating mipmap xml file Android ( ● ) Generating app icons ⏳... • Overwriting default iOS launcher icon with new icon ( ● ) Generating app icons ⏳... Creating Icons for Web... ( ● ) Generating app icons ⏳... Creating Icons for Windows... (● ) Generating app icons ⏳... Creating Icons for MacOS... ( ● ) Generating app icons ⏳... ✓ Successfully generated launcher icons [17:31:50] Generated app icons ✅ Run subprocess: ['C:\flutter_3.24.0\flutter\bin\dart.BAT', 'run', 'flutter_native_splash:create'] ( ● ) Generating splash screens (3.5s) Built flutter_native_splash:create. ( ● ) Generating splash screens ⏳... [Android] Creating default splash images (● ) Generating splash screens ⏳... [Android] Creating dark mode splash images ( ● ) Generating splash screens ⏳... [Android] Creating default android12splash images ( ● ) Generating splash screens ⏳... [Android] Creating dark mode android12splash images ( ● ) Generating splash screens ⏳... [Android] Updating launch background(s) with splash image path... [Android] - android/app/src/main/res/drawable/launch_background.xml ( ● ) Generating splash screens ⏳... [Android] - android/app/src/main/res/drawable-night/launch_background.xml [Android] - android/app/src/main/res/drawable-v21/launch_background.xml [Android] - android/app/src/main/res/drawable-night-v21/launch_background.xml [Android] Updating styles... [Android] - android/app/src/main/res/values-v31/styles.xml [Android] No android/app/src/main/res/values-v31/styles.xml found in your Android project [Android] Creating android/app/src/main/res/values-v31/styles.xml and adding it to your Android project ( ● ) Generating splash screens ⏳... [Android] - android/app/src/main/res/values-night-v31/styles.xml [Android] No android/app/src/main/res/values-night-v31/styles.xml found in your Android project [Android] Creating android/app/src/main/res/values-night-v31/styles.xml and adding it to your Android project [Android] - android/app/src/main/res/values/styles.xml [Android] - android/app/src/main/res/values-night/styles.xml [iOS] Creating images ( ● ) Generating splash screens ⏳... [iOS] Creating dark mode images ( ● ) Generating splash screens ⏳... [iOS] Updating ios/Runner/Info.plist for status bar hidden/visible ( ● ) Generating splash screens ⏳... [Web] Creating images ( ● ) Generating splash screens ⏳... [Web] Creating images ( ● ) Generating splash screens ⏳... [Web] Creating background images [Web] Creating CSS ( ● ) Generating splash screens ⏳... [Web] Updating index.html
✅ Native splash complete. Now go finish building something awesome! 💪 You rock! 🤘🤩 Like the package? Please give it a 👍 here: https://pub.dev/packages/flutter_native_splash
[17:32:00] Generated splash screens ✅ Run subprocess: ['C:\flutter_3.24.0\flutter\bin\dart.BAT', 'run', 'serious_python:main', 'package', 'D:\Usuarios\Alejandro\Documents\GitHub\manifestapp', '--platform', 'Android', '--requirements', 'flet==0.25.0,python-dotenv==1.0.1,requests==2.32.3', '--exclude', 'build', '--cleanup'] ( ●) Packaging Python app (1.2s) Built serious_python:main. ( ● ) Packaging Python app ⏳... Running package command Extra PyPi indexes: [https://pypi.flet.dev] Creating asset directory: D:\Usuarios\Alejandro\Documents\GitHub\manifestapp\build\flutter\app Created temp directory: C:\Users\ALEJAN~1\AppData\Local\Temp\serious_python_tempa36c90f6 Copying Python app from D:\Usuarios\Alejandro\Documents\GitHub\manifestapp to a temp directory ( ●) Packaging Python app ⏳... Cleanup app ( ● ) Packaging Python app ⏳... Configured Android/arm64-v8a platform with sitecustomize.py Installing [flet==0.25.0, python-dotenv==1.0.1, requests==2.32.3] with pip command to D:\Usuarios\Alejandro\Documents\GitHub\manifestapp\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 ( ● ) Packaging Python app ⏳... Extracting Python distributive ( ●) Packaging Python app ⏳... Cleanup installed packages ( ● ) Packaging Python app ⏳... Configured Android/armeabi-v7a platform with sitecustomize.py Installing [flet==0.25.0, python-dotenv==1.0.1, requests==2.32.3] with pip command to D:\Usuarios\Alejandro\Documents\GitHub\manifestapp\build\site-packages\armeabi-v7a ( ● ) Packaging Python app ⏳... Cleanup installed packages ( ● ) Packaging Python app ⏳... Configured Android/x86_64 platform with sitecustomize.py Installing [flet==0.25.0, python-dotenv==1.0.1, requests==2.32.3] with pip command to D:\Usuarios\Alejandro\Documents\GitHub\manifestapp\build\site-packages\x86_64 ( ● ) Packaging Python app ⏳... Cleanup installed packages ( ● ) Packaging Python app ⏳... Configured Android/x86 platform with sitecustomize.py Installing [flet==0.25.0, python-dotenv==1.0.1, requests==2.32.3] with pip command to D:\Usuarios\Alejandro\Documents\GitHub\manifestapp\build\site-packages\x86 ( ● ) Packaging Python app ⏳... Cleanup installed packages ( ● ) Packaging Python app ⏳... Creating app archive at D:\Usuarios\Alejandro\Documents\GitHub\manifestapp\build\flutter\app/app.zip from a temp directory ( ● ) Packaging Python app ⏳... Writing app archive hash to D:\Usuarios\Alejandro\Documents\GitHub\manifestapp\build\flutter\app/app.zip.hash (● ) Packaging Python app ⏳... Deleting temp directory [17:33:52] Packaged Python app ✅ Run subprocess: ['C:\flutter_3.24.0\flutter\bin\flutter.BAT', 'build', 'apk', '--build-name', '0.1.0'] ( ● ) Building .apk for Android ⏳... (1.1s) ( ● ) Building .apk for Android ⏳... ( ● ) Building .apk for Android ⏳... archive 3.6.1 (4.0.1 available) audioplayers 5.2.1 (6.1.0 available) audioplayers_android 4.0.3 (5.0.0 available) audioplayers_darwin 5.0.2 (6.0.0 available) audioplayers_linux 3.1.0 (4.0.0 available) audioplayers_platform_interface 6.1.0 (7.0.0 available) audioplayers_web 4.1.0 (5.0.1 available) audioplayers_windows 3.1.0 (4.0.0 available) characters 1.3.0 (1.4.0 available) clock 1.1.1 (1.1.2 available) collection 1.19.0 (1.19.1 available) ! file_picker 8.1.4 (overridden) (8.1.5 available) flet 0.25.1 (0.25.2 available) flet_audio 0.25.1 (0.25.2 available) flutter_lints 2.0.3 (5.0.0 available) image 4.3.0 (4.4.0 available) intl 0.19.0 (0.20.1 available) js 0.6.7 (0.7.1 available) lints 2.1.1 (5.1.0 available) material_color_utilities 0.11.1 (0.12.0 available) meta 1.15.0 (1.16.0 available) path 1.9.0 (1.9.1 available) sensors_plus 4.0.2 (6.1.1 available) sensors_plus_platform_interface 1.2.0 (2.0.1 available) serious_python 0.8.2 (0.8.4 available) toml 0.15.0 (0.16.0 available) url_strategy 0.2.0 (discontinued) ! wakelock_plus 1.2.8 (overridden) ! web 1.1.0 (overridden) web_socket_channel 2.4.5 (3.0.1 available) ! window_manager 0.4.3 (overridden) Got dependencies! 1 package is discontinued. 28 packages have newer versions incompatible with dependency constraints. Try
flutter pub outdatedfor more information. ( ● ) Building .apk for Android ⏳... /C:/Users/Alejandro/AppData/Local/Pub/Cache/hosted/pub.dev/flet-0.25.1/lib/src/utils/theme.dart:356:28: Error: A value of type 'TabBarThemeData' can't be returned from a function with return type 'TabBarTheme?'.
- 'TabBarThemeData' is from 'package:flutter/src/material/tab_bar_theme.dart' ('/C:/flutter_3.24.0/flutter/packages/flutter/lib/src/material/tab_bar_theme.dart').
- 'TabBarTheme' is from 'package:flutter/src/material/tab_bar_theme.dart' ('/C:/flutter_3.24.0/flutter/packages/flutter/lib/src/material/tab_bar_theme.dart'). return theme.tabBarTheme.copyWith( ^ ( ●) Building .apk for Android ⏳... /C:/Users/Alejandro/AppData/Local/Pub/Cache/hosted/pub.dev/flet-0.25.1/lib/src/utils/theme.dart:438:28: Error: A value of type 'DialogThemeData' can't be returned from a function with return type 'DialogTheme?'.
- 'DialogThemeData' is from 'package:flutter/src/material/dialog_theme.dart' ('/C:/flutter_3.24.0/flutter/packages/flutter/lib/src/material/dialog_theme.dart').
- 'DialogTheme' is from 'package:flutter/src/material/dialog_theme.dart' ('/C:/flutter_3.24.0/flutter/packages/flutter/lib/src/material/dialog_theme.dart'). return theme.dialogTheme.copyWith( ^ /C:/Users/Alejandro/AppData/Local/Pub/Cache/hosted/pub.dev/flet-0.25.1/lib/src/utils/theme.dart:482:26: Error: A value of type 'CardThemeData' can't be returned from a function with return type 'CardTheme?'.
- 'CardThemeData' is from 'package:flutter/src/material/card_theme.dart' ('/C:/flutter_3.24.0/flutter/packages/flutter/lib/src/material/card_theme.dart').
- 'CardTheme' is from 'package:flutter/src/material/card_theme.dart' ('/C:/flutter_3.24.0/flutter/packages/flutter/lib/src/material/card_theme.dart'). return theme.cardTheme.copyWith( ^ Target kernel_snapshot_program failed: Exception
FAILURE: Build failed with an exception.
- What went wrong: Execution failed for task ':app:compileFlutterBuildRelease'. ( ●) Building .apk for Android ⏳... > Process 'command 'C:\flutter_3.24.0\flutter\bin\flutter.bat'' finished with non-zero exit value 1
- Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights. Get more help at https://help.gradle.org.
BUILD FAILED in 37s ( ● ) Building .apk for Androi 38,9s ( ● ) Building .apk for Android ⏳... Gradle task assembleRelease failed with exit code 1 [17:34:37] Error building Flet app - see the log of failed command above. Run subprocess: ['C:\flutter_3.24.0\flutter\bin\flutter.BAT', '--version'] [17:34:38] Run subprocess: ['C:\flutter_3.24.0\flutter\bin\flutter.BAT', 'doctor'] [17:34:48] Doctor summary (to see all details, run flutter doctor -v): [√] Flutter (Channel stable, 3.27.0, on Microsoft Windows [Versi¢n 10.0.22631.4602], locale es-AR) [√] Windows Version (Installed version of Windows is version 10 or higher) [√] Android toolchain - develop for Android devices (Android SDK version 35.0.0) [√] Chrome - develop for the web [√] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.11.0) [√] Android Studio (version 2024.2) [√] VS Code (version 1.96.0) [√] Connected device (3 available) [√] Network resources
• No issues found!`
As mentioned in the Issue: #4548 Flet is not yet ready for Flutter 3.27.0
At the moment, build apk works correctly on flet==0.25.2 with Flutter 3.24.0-stable and on pyproject.toml:
[tool.flet.flutter.pubspec.dependency_overrides] file_picker = "8.1.4"
Thanks a lot!
Thanks for the solution and feedback. Will bump the version of file_picker we use to 8.1.4.
Upstream issue: https://github.com/miguelpruivo/flutter_file_picker/issues/1643
Updated app build template with file_picker: 8.1.4
Weird, I'm getting "registrar" error again with file_picker: 8.1.5. Regression?
We need to move to 8.1.6 (https://github.com/miguelpruivo/flutter_file_picker/issues/1643#issuecomment-2546108629)
I think this issue has already been fixed. Please upgrade to Flet version 0.25.2 and retry.