Can python build Android apps?

I am learning python and I donโ€™t know what will be useful for me if I want to make Android apps. I read somewhere that python can make an android app. But I want to ask you what is good or should we always use andriod studio to create android apps because it is specially designed for creating android apps.

+7


source to share


6 answers


I am the main Kivy developer mentioned in some of the other answers. I think this is the main option you have for building Python Android apps, and it has both advantages and disadvantages.

The main technical flaws are (both in my opinion and in my opinion, the main problems that I see people have):

  • Startup speed: If the application is not already running, it takes a short time for the Python interpreter to start, up to a few seconds on older devices (or much longer if you are bad at coding some things, but this can be avoided) during which the loading screen is displayed.

  • Lack of native look and feel: Kivy is its own opengl based graphical framework, so it doesn't look like standard Android apps (it can be customized, but still very difficult to perfectly emulate something like that)

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



There are other potential drawbacks as well, such as the standard non-Java issue of having to intercept the Android API when it changes, but I am looking at these smaller issues for example in this case as you can call most of the Java API directly from python from pizhny I have a blog post about this. Another problem is that the kivy community is small compared to the java application community, although it is also quite active.

For some people, one or more of these are immediate or potential barriers to using Kivy. For others, they don't matter or are outweighed by the benefits, and for these reasons there are people who use Kivy commercially on Android (and iOS). Personally, I'm most interested in the wide gap between "I wrote a simple script" and "I made a great polished Android application" because I think it should be easier than now to combine simple things into simple applications, but this is just my own the reason for using kiwi.

+8


source


If the question is, can I run python programs on android, then by all means, yes. But if you intend to create a usibg python mobile app, please have a look at kivy which still supports python 3. But outside of the love of python, it is best to stick with android studio for native android apps.



+1


source


Android does not come with a Python interpreter. Therefore, if you want to distribute an application written in Python, you will have to bundle the Python interpreter along with it. In other words, even "Hello World!" the app will be huge.

So yes it is possible . But not recommended.

+1


source


Chaquopy ( https://chaquo.com/chaquopy/ ) is an option for Python on Android. This is a plugin for Android Studio, so it can include the best of both worlds - using the Android Studio and Gradle interface, with Python code.

From the Chaquopy page:

With the Python API, you can write your application in part or in whole in Python. The complete Android API and UI toolkit are at your disposal.

An in-depth review of Chaquopy can be found at http://blog.codelv.com/2018/02/a-look-at-chaquopy-python-sdk-for.html.

The creator of Chaquopy also commented on this review as follows:

I think there is room for many different approaches to Python on Android. Chaquopy focuses on providing full access to all the functionality of the standard Android API and build tools. (For example, the XML layout file you mentioned was generated with Android Studio's WYSIWYG editor: it didn't have to be written by hand.) But if you want something more Pythonic or portable to other platforms then enaml-native or Kivy this is the way

WARNING: I have not tested this personally (yet) so I cannot verify how well it works. It is quite difficult.

Additional Notes: It looks like the license key is required to run for more than 5 minutes and requires payment. If you choose to develop open source, there is an open source license that "will always be free".

+1


source


It's possible! Please note the following: http://www.quora.com/Can-I-build-Android-apps-using-Python

0


source


try kivy https://github.com/kivy/python-for-android

It can be used to create Android apps.

0


source







All Articles