You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched the opened issues and there are no duplicates
Describe the bug
Hello.
I'm using Flet 0.27.6 to build an android app.
Local images/assets render on Windows app execution, but do not in Android execution via Flet android app.
logging library shows the image source path is not correct. Seems like it adds a src/main.py prefix to the path, instead of the specified or default assets folder path.
Hi, exactly the same for me. Also happens when building, installing and then running the apk-file on my Android device. So this seems to not be restricted to the flet Android app / development.
I have the same problem on version 0.28.2 and iOS. In the Flet app on iOS, this displays nothing. In the browser, the image appears but the quality is much lower than when I try it through vs code. This problem is showstopper for developing mobile offline apps.
import flet as ft
def main(page: ft.Page):
page.add(
ft.Image(src="images/image2.png", width=30, height=30)
)
ft.app(main, assets_dir="assets")
Duplicate Check
Describe the bug
Hello.
I'm using Flet 0.27.6 to build an android app.
Local images/assets render on Windows app execution, but do not in Android execution via Flet android app.
logging
library shows the image source path is not correct. Seems like it adds asrc/main.py
prefix to the path, instead of the specified or default assets folder path.There has been this exact same issue with Flet v0.22.1, which was closed because the Flet app had to be updated.
The Flet android client app is v2.0.1, with SDK v0.27.6 and Python version v3.12.9
File structure:
/testBugApp
/src
/assets
fgc.jpeg
main.py
Code sample
Code
To reproduce
flet run -r -d --android
Expected behavior
fgc.jpeg
image should be rendered in android execution.Screenshots / Videos
Captures
Windows execution (for comparison):

Android execution:

Flet App version:

Android version

Operating System
Windows
Operating system details
Windows 11 Home 24H2 using VSCode, running app using flet app from play store
Flet version
0.27.6
Regression
I'm not sure / I don't know
Suggestions
No response
Logs
Logs
I manually shut off the execution once the Android app connected to the run and checked it didn't render the image.
Line 2:
INFO: 192.168.1.129:49296 - "GET /src/main.pyfgc.jpeg HTTP/1.1" 404 Not Found
shows the GET request path to the image is malformed.Additional details
No response
The text was updated successfully, but these errors were encountered: