Repository navigation
Android APK crashes immediately after successful Flet build #6922
|
Hi everyone, I'm developing a mobile app with Python and Flet. I was finally able to build the Android APK successfully using GitHub Actions, and the APK installs correctly on my OnePlus 12R (OxygenOS 16.0.5). However, when I try to open the app, it immediately crashes and closes. The current APK size is about 62 MB. Package name: "com.J053.gestion_queso" I've tried checking the logs with Logcat Reader, but unfortunately I can't get any logs from the app process. Has anyone experienced a similar issue with Flet on Android? I'd really appreciate any help identifying what could be causing the crash. I can also provide the APK or the project files if someone is willing to take a look. Thank you! |
Replies: 1 comment 2 replies
|
Can you try building and testing a simple hello world flet app to see if it works on your end? Will be nice if you could provide the link to your repo if its opensource, so we can have a closer look. |
Thanks for the repo, that made it easy to find.
Quick fix: add
fletto your dependencies inpyproject.tomland rebuild:Why it crashes: your APK doesn't contain the
fletPython package. With nodependenciesinpyproject.toml(and norequirements.txt), Flet 0.25.2'sflet buildpackages your app without installing any Python packages. You can see it in your CI log: theserious_python ... packagestep runs without--requirements. On startup the app fails before it can report the error, so it just closes, and that's why Logcat shows nothing useful. (Since Flet 0.26.0,flet buildaddsflet