Is it possible to create an application in C / C ++ for Android?

8

I want to create an Android application using C or C ++ language. What are the advantages and disadvantages of this?

    
asked by anonymous 01.06.2017 / 19:59

2 answers

13

Yes, it is possible, There is something called NDK (great the translator used on this site, translated up the code :)).

  • Obviously you'll have more performance
  • It may be better or easier to do some specific things
  • You have much more control over memory, you can avoid the garbage collector
  • can use desired libraries in these languages directly
  • You may be using a language that is most comfortable.

If you remember something else I post.

  • It's harder to program in these languages, it's easy to make more mistakes and create insecurity, it's less productive
  • is not the primary language, needs to interoperate with the Android JVM
  • Some things in Android are harder to use with NDK.

Here's a kick, go from Java or C #, even if you say little I can infer that it is the most appropriate path for your case:)

    
01.06.2017 / 20:15
0
Well, for normal applications I do not see advantages, so much so that I knew ndk I thought that it was possible to create 100% C / C ++ applications, but it is not so, so much that something that eluded me most was the fact that there are native views in the findViewById style picking by xml, I recommend using it for applications that need performance as an emulator or a game, in this case you will be able to create in 98% pure C / C ++.

    
09.01.2018 / 18:53