什么是Python的Andr​​oid上的限制? [英] What are the limitations of Python on Android?

查看:223
本文介绍了什么是Python的Andr​​oid上的限制?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正准备开始一点点Android开发,需要选择一种语言。我知道Python的,但必须学习Java。我想知道,从那些你们谁是在Android上使用Python什么局限性。此外,是否有过的Java什么好处?

I am getting ready to start a little Android development and need to choose a language. I know Python but would have to learn Java. I'd like to know from those of you who are using Python on Android what the limitations are. Also, are there any benefits over Java?

推荐答案

我调查了这家最近出于同样的原因。我的结论是,我不能使用Python开发具有本地外观的应用程序,这是我想要的东西的时候。具体做法是:

I investigated this recently for similar reasons. My conclusions were that I could not use Python to develop a native-looking application, which is what I wanted at the time. Specifically:

  • Python不能从Java UI类接收回调,所以你不能使用任何本地Java UI元素,如ListView控件等都是容易获得的,只有对话框等。如果你有一个完全自定义用户界面,如游戏,你可以尝试 pygame的为Android ,或者你可以看的Kivy ,它也使用pygame的。

  • Python can't receive callbacks from the Java UI classes, so you can't use any native Java UI elements such as ListView, etc. Only dialog boxes etc. are easily available. If you have a totally custom UI such as a game, you can try PyGame for Android, or you could look at Kivy, which also uses PyGame.

包装Python应用程序是非常困难的,尤其是因为Python的跨preTER默认情况下不包括在Android上。该Kivy和pygame的团队正在对这一一些间歇性的进展。

Packaging of Python applications is very difficult, especially because the Python interpreter is not included on Android by default. The Kivy and PyGame teams are making some intermittent progress on this.

由于上述问题,Python的本质从来没有用来做出版的应用程序商店完全成熟的应用,等等如何处理许多杂物问题SL4A(脚本层安卓)文学是非常薄。

Because of the aforementioned issues, Python is essentially never used to make full fledged applications published in the app store, and so the literature on how to handle the many sundry issues with SL4A (Scripting Layer For Android) is very thin.

所以,如果你想使用原生UI元素,你实际上可以分布在Play商店,或两者的应用程序,Python是令人遗憾的是没有一个选项。

So, if you want to make an application that uses native UI elements, that you can actually distribute in the Play Store, or both, Python is regrettably not an option.

这篇关于什么是Python的Andr​​oid上的限制?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆