0

In latest Android Studio 2.0 I am trying to run the ndk example, but build is breaking with the following error:

/Users/ktulsia/AndroidStudioProjects/example/app/src/main/jni/hello-jni.cpp
Error:(18, 18) string: No such file or directory
compilation terminated.
Error:Execution failed for task ':app:compileArm64-v8aDebugHello-jniSharedLibraryHello-jniMainCpp'.
> A build operation failed.
  C++ compiler failed while compiling hello-jni.cpp.
See the complete log at: file:///Users/ktulsia/AndroidStudioProjects/example/app/build/tmp/compileArm64-v8aDebugHello-jniSharedLibraryHello-jniMainCpp/output.txt
Kishore Tulsiani
  • 1,106
  • 13
  • 29
  • If you're trying to use exceptions or STL capabilities from the C++ library, they aren't supported by the default NDK compiler toolchain. You may find some help here: http://developer.android.com/ndk/guides/cpp-support.html – Michael Burr Apr 20 '16 at 22:01
  • just trying to run simple helloworld example java calling c++ – Kishore Tulsiani Apr 20 '16 at 22:34

1 Answers1

0

As i was very new to NDK it took some time to figure out the approach and options.

here are two very nice pages i have found which helped solve almost all the issues. and understand how the latest Android studio works with NDK.

link 1 link 2

even though i referred the above pages but I tried the NDK on Android studio 2.0 and it is working fine. so wanted to share the same

Kishore Tulsiani
  • 1,106
  • 13
  • 29