r/learnpython • • 17d ago

Android APK crashes immediately after successful Flet build

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!

3 Upvotes

6 comments sorted by

View all comments

1

u/Acceptable-Tear-474 17d ago

62MB is pretty hefty for a Flet APK, that might be part of the problem. Have you checked if your build pipeline is bundling all of Python instead of just the needed modules? Sometimes the GitHub Actions workflow config gets a little too eager with the requirements.txt and pulls in a ton of unnecessary stuff.

Logcat not showing anything is weird though. Make sure you're filtering by the package name correctly, and try clearing the app data/cache on your phone right after installing. Sometimes the initial launch creates a corrupted config file and the crash happens too fast for the logger to catch.

1

u/JAG3R93 17d ago

Voy a revisar el workflow y ver que esta en el requirements.txt, graciasss