+ 5

Can i make android apps by using "C++"

7th Jul 2017, 4:15 PM
Amara Abdelghani
Amara Abdelghani - avatar
3 Answers
+ 11
Through the use of Android NDK. https://developer.android.com/ndk/index.html
7th Jul 2017, 4:36 PM
Hatsy Rei
Hatsy Rei - avatar
+ 5
thank you @hatsy rei
7th Jul 2017, 4:37 PM
Amara Abdelghani
Amara Abdelghani - avatar
+ 1
Advantages of C++ over Java Java is an excellent language, but for Android mobile development, C++ has a few advantages. These include a smaller memory footprint, as C++ is nearer the metal and has no garbage collection. C++ is a superset of C and should compile virtually all C programs, so you could reuse C software. Then there’s the speed issue: it’s often claimed that Java programs can run as fast as C++, and in some cases faster. While I’ve no reason to doubt it (see the section above about JVM), you may need to tweak your Java code to get that level of performance. Java source code is compiled to bytecode and stored in .jar files, which are zip files. At runtime, the JVM loads the .jar file bytecode and compiles it to machine code. This is JIT: Just-In-Time Compilation. Compare that to C++, which has no “warm up” time. For that reason, at least in my experience, C++ applications always feel a little snappier than Java (or C#) on the same hardware. The code below is from the NDK Reference for NativeActivity; it’s the first part of initializing the activity for writing to the OpenGL screen:
18th Jul 2017, 6:37 AM
RAHUL KUMAR
RAHUL KUMAR - avatar