问题
I know you can write apps in c, c++, and java. However I have heard that android also supports scheme, python, lua, and others but never could find it verified or an actual list.
回答1:
Here are some that I use on my (unrooted) 2.2 and 2.3 phones (plus pForth from the command line)
Market compilers and interpreters:
- BASIC!+SQL
- Light Basic
- CalcScipt (RPN)
- Clojure REPL
- Android Shell (Beanshell)
- JavaIDEdroid (Java)
- Andjedi (Java)
- Terminal IDE (Java)
- AIDL (Java)
- aDosBox (DOS languages via emulation)
- Android Logo
- Gambit (Scheme)
- GCC and G++ (via command line)
- Tiny C Compiler
- SpiderMonkey (command line javascript)
- Generate (javascript based graphical)
- Processing (javascript based)
- cat (javascript based functional RPN)
- Graphicalc (C interp)
- IProgram (Basic like)
- JoyToy (Basic like)
- Tiny Lisp ISLisproid
- Luarida (Lua)
- Mathscript
- Mobile BASIC
- Mobile Futon (couchdb+javascript server)
- OCaml toplevel for Android
- Pascal
- Pepe (Pascal compiler)
- Retro (javascript based Forth-like)
- Rubuto IRB (jRuby)
- SchemeREPL
- Scheme-droid
- Sharpoid (javascript based)
- Sigmascript (Lua)
- C# to go
- ScriptBlocks (visual,symPy based)
- i-Jetty (servlets using one of the Java compiler systems above)
The languages presently supported by SL4A are Beanshell, Rhino javascript, jRuby, perl,TCL, PHP, Python, ash, Lua, squirrel.
回答2:
It seems you are referring to the scripting layer for Android, here is what the Scripting Layer for Android site says about supported languages:
"Python, Perl, JRuby, Lua, BeanShell, JavaScript, Tcl, and shell are currently supported, and we're planning to add more."
回答3:
Officially, no
Unofficially, Scala, Scheme and others have modified runtimes and compilers to work on android. Those that compile/translate directly to dex opcodes without too big of 3rd party lib contained in the apk are of course better performance wise.
来源:https://stackoverflow.com/questions/4182024/what-programming-languages-does-2-2-officially-support