0

I have to submit a .apk file for a competition. I used tkinter module of python for the same. I am unable to convert my.py with tkinter code to .apk I have tried making setup files and exe to apk tools as I converter my file to .exe and I still have my.py Please help! Note: Can i convert it into web app and then make .apk

2 Answers2

3

Well, it's better to use Kivy framework for mobile development on python. But if you really want to run your program with TKinter on mobile you can try Pydroid3 app, you can get it in Play Market. Just copy source code of your project on your phone, open it in Pydroid and run it (First you'll need to install TKinter in this app)

Note that you can use Pydroid to run your code once, but if you wanna make an apk then you need to write your project with Kivy, but not with TKinter. You can install Kivy on your computer with pip by typing pip install kivy . You can get started with Kivy here

1

Tkinter does not support mobile; it's only for desktop apps. I suggest you use kivy because it's the best for mobile development, and the same code can be used for all platforms.

You don't need to modify the code for desktop, mobile, etc. one piece of code is enough.

Leonard
  • 2,510
  • 18
  • 37