Is There a Way to Use Tkinter on Android Apps?

0
12
Asked By CreativeCoder92 On

I'm currently developing a mini IDE code editor app for Android using Flutter and I've managed to include a cross-compiled Python interpreter within the app. However, I've hit a roadblock because Tkinter isn't running. I understand that Tkinter isn't natively supported on Android, but I'm curious if there's any workaround for it. For example, how does the Pydroid app manage to incorporate it? Additionally, if I consider cross-compiling TCL and Tk using NDK, how would I set up a display server similar to X11 or Wayland for desktop applications?

2 Answers

Answered By LinuxLover69 On

Have you considered running a full Linux environment on your device? Tkinter has historically been more stable on Linux/Unix systems, so you might find that path easier to manage.

FlutterFan123 -

Good point! But this is primarily an Android app made with Flutter. The Python build for Android lacks Tkinter, and since Android uses a different way to handle GUIs, traditional Tkinter integration isn't straightforward. I'm looking for a workaround similar to what Pydroid seems to achieve.

Answered By TechieTommy On

I haven't personally tried it, but if I remember correctly, Briefcase could support native UIs across platforms. You might want to look into that! It might help with your project.

CodeRunner86 -

True, Briefcase is mainly for converting Python projects into executables. Your case is different since you're running scripts directly within the app, like Pydroid does. Still, it could be worth checking out as an alternative!

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.