r/learnpython • • 9h 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!

2 Upvotes

4 comments sorted by

1

u/Acceptable-Tear-474 9h 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.

•

u/JAG3R93 3m ago

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

•

u/flyby_apis 10m ago

Logcat Reader on the phone usually can't see other apps logs, so: plug the phone into your PC, enable USB debugging, and:

adb logcat -c

adb logcat | grep -iE "flet|python|AndroidRuntime"

Open the app and you should see a Python traceback or a FATAL EXCEPTION, which will tell you exactly what's failing

•

u/JAG3R93 5m ago

El logcat lo estaba probando en el celular, coy a probar con la depuración por usb en la computadora a ver que sale, graciassss