ModuleNotFoundError On runtime apk
Im building a flet app for android, everything work properly on windows but when i finish the apk build i always have ModuleNotFoundError
I thing flet build apk does not include custums module in src directory i really need some help to fix this !
OK, see what you have inside your .apk.
Rename .apk to .zip and unpack it.
Locate app.zip at assets/flutter_assets/app inside of an archive.
Unpack app.zip and check if you have custom modules there.
Then try displaying sys.path in your app, by adding something like:
import sys
# ...
def main(page: ft.Page):
page.add(ft.Text(f"sys.path: {sys.path}"))
The issue has been fixed. .apk package built on Windows (can be downloaded from here) is running on Android emulator just fine.
Delete build directory inside app's dir before re-building.
Let me know how that worked for you.
Hello @FeodorFitsner
Mu last build worked🚀🤩properly on android without any issues for now
Thanks Happy hollidays