-
Notifications
You must be signed in to change notification settings - Fork 547
Description
Duplicate Check
- I have searched the opened issues and there are no duplicates
Describe the bug
Hey guys, I'm using Flet 0.25.1 in my project, but I'm having trouble running the generated APK. To clarify my doubts, I decided to create a new Flet project using flet create
. I built the APK of the sample code that comes with the project, but even the APK of the sample code doesn't run on my Asus or Samsung phones, nor on the Android emulator.
I'm getting this error:
12-03 03:44:49.852 6542 6542 W com.flet.src: type=1400 audit(0.0:141): avc: denied { read } for name="max_map_count" dev="proc" ino=50995 scontext=u:r:untrusted_app:s0:c166,c256,c512,c768 tcontext=u:object_r:proc_max_map_count:s0 tclass=file permissive=0 app=com.flet.src
Even when using a rooted phono with setenforce 0
the error persists
When I click on the app icon, it goes to a blank white page and then closes automatically, showing the following message: "src stopped working."
Code sample
Code
import flet as ft
def main(page: ft.Page):
counter = ft.Text("0", size=50, data=0)
def increment_click(e):
counter.data += 1
counter.value = str(counter.data)
counter.update()
page.floating_action_button = ft.FloatingActionButton(
icon=ft.Icons.ADD, on_click=increment_click
)
page.add(
ft.SafeArea(
ft.Container(
counter,
alignment=ft.alignment.center,
),
expand=True,
)
)
ft.app(main)
To reproduce
flet build apk
(i also tried withflet build apk --arch x86_64
)adb install C:\Users\youruser\path_to_apk_folder\app-release.apk
(make sure that a adb devices is running)adb logcat -s "com.flet.src"
(to see logs of flet app)
Expected behavior
I expected the APK of the sample code to run, but instead, I get a blank white screen and the error described above.
Screenshots / Videos
Captures
[Upload media here]
Operating System
Windows
Operating system details
Windows 11
Flet version
0.25.1
Regression
No, it isn't
Suggestions
No response
Logs
Logs
12-03 03:59:07.542 6613 6613 W com.flet.src: type=1400 audit(0.0:142): avc: denied { read } for name="max_map_count" dev="proc" ino=50995 scontext=u:r:untrusted_app:s0:c166,c256,c512,c768 tcontext=u:object_r:proc_max_map_count:s0 tclass=file permissive=0 app=com.flet.src
Additional details
No response