I'm just starting out with Android development and I've been curious about why Python isn't typically used to create native Android apps like Kotlin or Java. I know there are frameworks like Kivy that allow for developing apps in Python, but those often either require a Python runtime to be bundled or use bridges like WebViews. I've been thinking about a hypothetical situation where there might be a framework that lets you write in a simplified version of Python that compiles directly to native Android formats (APK, Dalvik, or ART) without needing to ship Python itself. Is this idea unrealistic? I have a few specific questions: Is the issue Python's dynamic typing, the Android build tools, performance, compatibility with the Android SDK, or is it just too complex for the payoff? I'd love insights from anyone who understands Android's inner workings or has experience with app development.
3 Answers
Python typically gets a bad rap for efficiency on mobile. Since it’s mainly an interpreted language, it tends to be more resource-hogging, which isn't ideal for battery-powered devices. This runtime overhead can be a hurdle.
As you mentioned, frameworks like Flutter or Ionic ultimately require Java/Kotlin to get packaged. That's because the Android structure is heavily tied to those languages for native support.
Have you checked out BeeWare? It’s an interesting project that allows you to write applications in Python and deploy them on Android and other platforms. It still bundles a Python runtime, but it's a step in the direction you’re thinking about!
This sounds pretty cool! It could make mobile development a lot less intimidating for beginners.
Definitely, but eventually you may still need to dive into Swift or Kotlin to really get the most out of mobile development.

But if Python could be used successfully, I wonder how the developer community would react. Would they still prefer Java/Kotlin over it, even if Python apps performed well?