7

Is it possible to use C/C++ code in Android? And how easy is it?

The Student
  • 26,271
  • 66
  • 155
  • 257

1 Answers1

8

Its possible. Use the Native Development Kit (NDK). See here for more discussion and links.

How easy is it? I don't know, I've never tried!

Community
  • 1
  • 1
Andy Johnson
  • 7,752
  • 4
  • 31
  • 46
  • 1
    It's pretty easy! All you need to do is create your classes in C++, then use JNI to launch your Native code. One think to keep in mind, though, is that there is not a full STL implementation in Android, so you can't use things like std::vectors or std::strings. – CaseyB Apr 14 '10 at 18:20
  • Isn't Android used on Arm and on i386 processors? – stesch Apr 14 '10 at 20:47
  • Supported on ARM, MIPS, Power Architecture, and x86. – Andy Johnson Apr 15 '10 at 08:46