Question

I just started to discover android and I would like to use NDK with android studio 0.5.7. I'm using ndk-r9d.

Therefore, I've followed the tutorial http://www.youtube.com/watch?v=okLKfxfbz40

In my project, I had the known problem NDK_PROJECT_PATH=null. I could resolve that by compiling manually the native code.

But in this tutorial, he's able to compile C file directly with gradle and android studio (0.5.1). (He's on windows)

Is there now a better way to make gradle works with NDK instead of compiling everything manually ?

Was it helpful?

Solution

I've actually made this video. You can get more background information on this from my article: Android Studio NDK integration

NDK_PROJECT_PATH=null is normal with Android Studio, it compiles without it by generating its own Android.mk file and using absolute paths.

The way with android studio 0.5.7 and any OS hasn't changed. If you have sources inside jni/ folder they should get compiled automatically.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top