12

I have looked around and was unable to find any questions regarding this exact question. I did find some similar questions but not exactly what I want know.

If you develop an Android application in C/C++, will there be a (substantial) speed difference when compared to developing the same application in Java?

1 Answers1

12

From the Android docs:

The NDK will not benefit most applications. As a developer, you need to balance its benefits against its drawbacks; notably, using native code does not result in an automatic performance increase, but always increases application complexity. In general, you should only use native code if it is essential to your application, not just because you prefer to program in C/C++.

The NDK was intended to be used in performance-critical situations only.

You can however create a whole application with C/C++ but only if the device runs Android 2.3 or later: Can I make a rather native C++ app with Android?

Community
  • 1
  • 1
Lukas Knuth
  • 25,449
  • 15
  • 83
  • 111