I've learnt python recently and I want to make an app for android. But everywhere on the net, it seems Java and Eclipse are the only ones that can be used. So, my question is: 1) Can I use python to make an android app? 2) What kind of platform should I use to make an app with python? Thanks guys!
-
I don't know where you searched, but there are probably several ways to create Android apps in Python. One example : kivy.orgMickäel A.– Mickäel A.2014-04-03 04:06:54 +00:00Commented Apr 3, 2014 at 4:06
-
You should better learn java. There may be ways to create apps with Python or not. But I think java may be the best.Zin Win Htet– Zin Win Htet2014-04-03 05:15:57 +00:00Commented Apr 3, 2014 at 5:15
2 Answers
If you're just looking to run Python scripts, try QPython.
If you're looking to make your Python code run like a native app, or just something more robust than the above, try SL4A.
If you're looking to effectively use Python as a library, and compile an .apk with the Python library included, try Kivy: github.com/kivy/python-for-android.
That said, you'd likely get a lot of benefit from learning Java, and not just for programming natively in Android (which would give you access to a much wider feature set and make your app run more efficiently).
Comments
Check out the Scripting Layer For Android, aka SL4A.
Here is a blog for getting started. The blog promises more entries in the series but there don't seem to be any. Still, it is a great starting point. There's quite a few parts to pull together so be patient and check the bottom of that blog entry for dozens of useful links.
If you want to contain everything to the Android device, including the IDE (pretty slick), check this out.
Here's a book from APress that could help with more advanced concepts: Pro Android Python with SL4A