Can python build android apps?

Akshat Patni picture Akshat Patni · May 26, 2015 · Viewed 23.1k times · Source

I am learning python and i don't know that it will be helpful to me if i want to make android apps.I have read somewhere that python can make android app.But I want to ask you that is it a good option or we should always use andriod studio to make android apps because that is developed particularly for creating android apps.

Answer

inclement picture inclement · May 27, 2015

I'm a core developer of Kivy, which has been mentioned in some of the other answers. I think it's the main option you have for making python apps for android, and it has both advantages and disadvantages.

The main technical disadvantages are (both in my opinion and I think the main problems I see people raise):

  • Startup speed: if the app isn't already running it takes a short time to spin up the python interpreter, up to a few seconds on older devices (or much longer if you code some things badly but that's avoidable), during which time a loading screen is displayed.

  • Lack of native look and feel: Kivy is its own opengl-based graphical framework, so it doesn't look like default android apps (it's customisable but still very hard to perfectly emulate something like that)

  • APK size: Because you have to package the python interpreter, the minimum apk size is about 7MB.

Ther are other potential disadvantages, such as the standard non-java problem of having to catch up the android api when it changes, but I consider these more minor issues, e.g. in this case since you can actually call much of the java api directly from python with pyjnius. I have a blog post about this. Another problem is that kivy's community is small compared to that of the java app community, though it's also quite active.

For some people, one or more of these are immediate or eventual barriers to using Kivy. For others they don't matter or are outweighed by the advantages, and for these reasons there are people using Kivy commercially on Android (and iOS). Personally I'm most interested in the wide space between 'I wrote a simple script' and 'I made a big polished android app', because I think it should be easier than it currently is to bundle simple things as simple apps, but that's just my own reason for using kivy.