4 ms·
Ask HN: Android apps with C++/NDK and no Java?
I understand why Google's website says "Using native code does not result in an automatic performance increase, but always increases application complexity. If you have not run into any limitations using the Android framework APIs, you probably do not need the NDK."
Clearly Java offers advantages like
1. For most people, Java is easier to learn/code.
2. StackOverflow and other sites have a lot more Android-Java content (and comparatively lesser Android/C++ content).
However, aside from these points, does anyone know if there are other disadvantages with writing a C++ Android app with no Java code. Does the SDK offer additional apis to Java programmers and is anything missing in the NDK for C++ programmers (assuming that I only care about 2.3.x and higher versions of Android)
- stewie2 14y agoYou can't create user interface with c. unless you want to draw your buttons with opengl. that's what games do. ndk is ideal for games, but not for other types of apps.
- credo 14y agoThanks, I'll look into the possibility of creating Java wrappers for the user-interface-elements and interop between the Java wrappers and C++ code. It is too bad that the SDK apis aren't directly available to C++ code (without the interop overhead).