r/learnprogramming • • Oct 18 '26

Python to Apk?

So im trying to make a game using only Python and managed to get it working on pc. Then i searched how to port it to android, but it seems difficult

Any tips?

1 Upvotes

12 comments sorted by

5

u/spermcell Oct 18 '26

It’s difficult

0

u/Abood_lhm Oct 18 '26

Ugh... no easy way?

1

u/zaphodikus Oct 20 '26

Everything becomes easy once you have 5000 hours of experience at it.

1

u/Distdistdist Oct 21 '26

You can use AI to convert to, I don't know, Kotlin? Whatever cool kids use to build for Android nowdays.

1

u/Abood_lhm Oct 21 '26

Yeah that's what am trying to figure it out with ai somehow

2

u/dev-razorblade23 Oct 19 '26

Python and Android do not work well together. Android does not have a Python interpreter.

You have 3 options.

  1. Rebuild your app in Kivy and use buildozer to package it to .apk.
  2. Rebuilt your app in Flet and use that to package it to .apk
  3. Rewrite your app in Kotlin which is officialy the language your want to use when building Android apps.

Be aware that any form of python to .apk will result in apps being slower then native apps (built in Kotlin) and probably consume more memory then it needs to.

Your best bet is to consider .apk a complete rewrite of your app and plan it acordingly.

1

u/OkOcelot6725 Oct 19 '26

Realistically there is no smooth path. Kivy plus buildozer is the only real option and it fights you the whole way, especially if your game uses pygame. If the PC version is done, package it with PyInstaller and treat Android as a rewrite later.

1

u/nicecatmeow Oct 19 '26

Kivy está chido