-
Notifications
You must be signed in to change notification settings - Fork 492
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem with the new pypi flet_permission_handler in 0.26.0. #4841
Comments
No need to use
Build with |
Thanks Feodor. The same happends with flet build apk -v. Log here: [18:02:06] Run subprocess: ['C:\Users\tonch\flutter\bin\flutter.BAT', '--version', '--no-version-check', '--suppress-analytics']
[18:02:12] Created Flutter bootstrap project from gh:flet-dev/flet-build-template with ref "0.26.0" ✅
[18:03:48] • Updating colors.xml with color for adaptive icon background
[18:03:56] Resolving dependencies... |
It looks good from the logs. What error are you getting when running the app on a phone? How do you import flet_permission_handler in the app? |
Im getting this error once opening my app in mobile: Traceback (most recent call last): To import flet_permission_handler in the app I did: In main.py: import flet_permission_handler as fph In .toml in [tool.poetry.dependencies]: flet-permission-handler = "^0.1.0" |
OK, can you see what's inside |
Edit your
|
Its not working. I think I will try to enable permissions manually for a time and continue working in this issue. If I can solve the problem you will be noticed here. Thanks all mates. |
Duplicate Check
Describe the bug
I replicated the steps of the docs and 0.26.0 blog to install, copy-paste code (adapting to the context), run and make apk process.
No problem with anything until apk done, no error in any file or process until apk is done with success.
When I try the apk app in the phone, a white page opens and raises an error: No module named flet_permission_handler.
I think the problem is that once apk is done, flutter dart files related with flet_permission_handler dont recognice the imports and thats because once apk is done mi pubspec.yaml looks like this in the lines related with the flet_permission_handler:
dependencies:
cupertino_icons: ^1.0.6
flet_permission_handler:
path: C:\Users*user*\Desktop*appname*\build\flutter-packages\flet_permission_handler
flutter:
sdk: flutter
package_info_plus: ^8.0.2
path: ^1.9.0
path_provider: ^2.1.4
serious_python: 0.8.7
url_strategy: ^0.2.0
window_manager: ^0.4.3
The path of the module is a windows path that references the proyect folder where the flet_permission_handler dart files are located (the ones that give errors in their imports).
So when I try flet run --android it works perfectly in the play store flet app for emulation, because the app is really runing in my computer and it can access the path and open the android settings at the same time.
But when apk done the yaml cannot redirect to anywhere because in my mobile that path does not exist.
How can I solve it? Thanks.
Code sample
Code
To reproduce
https://pypi.org/project/flet-permission-handler/
https://flet.dev/docs/controls/permissionhandler/
Expected behavior
Open android settings
Screenshots / Videos
Captures
[Upload media here]
Operating System
windows 11
Operating system details
None
Flet version
0.26.0
Regression
I'm not sure / I don't know
Suggestions
No response
Logs
Logs
[Paste your logs here]
Additional details
I tryed with flet build apk and flet build apk --include-packages flet_permission_handler. I tryed the 3º party asociated module and the same happends.
The text was updated successfully, but these errors were encountered: