flet-dev / flet

Flet enables developers to easily build realtime web, mobile and desktop apps in Python. No frontend experience required.
https://flet.dev
Apache License 2.0
9.43k stars 360 forks source link

apk build fails with requirements.txt #3167

Open praskuma opened 2 weeks ago

praskuma commented 2 weeks ago

There is something strange I observed.

As long as there is no requirements.txt or requiremnets.txt is empty

flet build apk --verbose works fine

The moment you add a module(let it be any module) to requirements,txt, "flet build apk --verbose" gets stuck at "Extracting Python distributive from"

OS: Windows Flet : 0.22.0

praskuma commented 2 weeks ago

just fyi im trying to include yfinance into requirements.txt

praskuma commented 2 weeks ago

C:\ex\py\ap>flutter --version Flutter 3.19.6 • channel stable • https://github.com/flutter/flutter.git Framework • revision 54e66469a9 (2 weeks ago) • 2024-04-17 13:08:03 -0700 Engine • revision c4cd48e186 Tools • Dart 3.3.4 • DevTools 2.31.1

zox47 commented 2 weeks ago

The same problem with me

JustinMissmahl commented 1 week ago

same problem here trying to build a apk including web3

flet==0.22.1 aiohttp==3.9.5 web3==7.0.0b5

praskuma commented 5 days ago

Can someone please look into this or give some clue. Not able to create apk

baseplate-admin commented 5 days ago

@praskuma, the reason you cant build that apk is because

Yfinance internally depends on:

These are native applications and they probably dont have a recipe in the python-for-android repo

The moment you add a module(let it be any module) to requirements,txt,

To be honest flet support for any module is lackluster at this moment. If you want to see support of flet for modern android you should follow this repo

baseplate-admin commented 5 days ago

@JustinMissmahl, aiohttp is not available for android

praskuma commented 5 days ago

@baseplate-admin thanks for the details.

Sure i will try out

https://github.com/flet-dev/python-mobile and update.

baseplate-admin commented 5 days ago

@praskuma, python-mobile will be used internally by flet.

@FeodorFitsner can update you on this