top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

I have developed applications with android SDK. However I want to know what is NDK and how to use it?

+2 votes
435 views
I have developed applications with android SDK. However I want to know what is NDK and how to use it?
posted Sep 19, 2016 by Akshay

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+1 vote
 
Best answer

Android NDK is the package that allows the developers to develop part of application to be in either C or C++.
.
Why do we need c/c++ for?
To access core dalvik features, make some intensive calculations, etc.,
.
Things to do even when you are in native development:
Let's just say you are developing a part of application using c or c++, it doesn't mean it will handle memory allocation and deallocation by itself. We have to take care of that properly..
.
Why not to use NDK
Well, you can't (or don't want to) develop the whole application in C or C++. Because you could possibly introduce bugs and device/platform specific features that inturn become bugs for other devices or OSs. And since you have access to dalvik features you should probably be more careful working with NDK.
.
Hope this helps.

answer Sep 20, 2016 by Vinod Kumar K V
Similar Questions
+3 votes

I was trying to develop an NDK application with gradle and that caused some errors. So, I changed to gradle-experimental. Now it works, but other functionalities are not working now. What should I do?

0 votes

I have created a JAVA class exposing native API. I have kept this class in _frameworks/base/core/java/com/myDomain/myPackage/myClass.java_ and for this i have already created JNI C code files and their entries in required make files.

But after building the SDK, it didn't include expected package _com.myDomain.myPackage_.

Is there any specific configuration file(s) where I would have to make entries to include it in Android SDK, or the place is incorrect where currently class files is kept.

...