+ 3
Is it necessary to use only "Java" for creating an android application?
C++ is faster and Python looks easier. But everyone recommends Java for creating an android software. Is it necessary to use only Java for android? And what are the drawbacks of using other languages such as c++, Python and Ruby?
4 Respuestas
+ 17
Java has an already implemented universum of Android-related libraries. This is why it is easier to build apps in it.
But theoretically and practically you can build applications in other languages, too. For example, Python's kivy module or sl4a (scripting layer for Android) are capable of building an .apk
+ 2
The Android environment is designed to run a JVM-like executable (called "dalvik", using .dex files). Any language that generates normal JVM (JAR) files can be used, e.g. Java, Kotlin, or other JVM languages.
https://github.com/dogriffiths/HeadFirstAndroid/wiki/How-Android-Apps-are-Built-and-Run
(before 5.0 dalvik was run directly, and later they compiled dalvik executables to native code after app install).
Technically you cannot take a native x86 or ARM binary executable and run it on android. Yoy can use C++ but only as a library called from a wrapper java code.
Even react-native runs on android by using a java part rendering the GUI and a javascript engine that runs the rest.