I am trying to learn Android-NDK, so i am trying to modify existing examples so I am trying to build apk from Android-PCAP but unable to do so, and getting this error message
Information:Gradle tasks [:app:assembleDebug]
WARNING [Project: :app] Current NDK support is deprecated. Alternative will be provided in the future.
:app:preBuild UP-TO-DATE
:app:preDebugBuild UP-TO-DATE
:app:checkDebugManifest
:app:preReleaseBuild UP-TO-DATE
:app:prepareComAndroidSupportGridlayoutV71800Library UP-TO-DATE
:app:prepareDebugDependencies
:app:compileDebugAidl UP-TO-DATE
:app:compileDebugRenderscript UP-TO-DATE
:app:generateDebugBuildConfig UP-TO-DATE
:app:generateDebugAssets UP-TO-DATE
:app:mergeDebugAssets UP-TO-DATE
:app:generateDebugResValues UP-TO-DATE
:app:generateDebugResources UP-TO-DATE
:app:mergeDebugResources UP-TO-DATE
:app:processDebugManifest UP-TO-DATE
:app:processDebugResources UP-TO-DATE
:app:generateDebugSources UP-TO-DATE
:app:processDebugJavaRes UP-TO-DATE
:app:compileDebugJava UP-TO-DATE
:app:compileDebugNdk
/home/nika/workspace/android-pcap/app/src/main/jni/libpcap/pcap-snoop.cpp:36:21: fatal error: net/raw.h: No such file or directory
#include <net/raw.h>
^
compilation terminated.
make: *** [/home/nika/workspace/android- pcap/app/build/intermediates/ndk/debug/obj/local/arm64- v8a/objs/pcap//home/nika/workspace/android-pcap/app/src/main/jni/libpcap/pcap-snoop.o] Error 1
Error:Execution failed for task ':app:compileDebugNdk'.
> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/opt/android-ndk/ndk-build'' finished with non-zero exit value 2
Information:BUILD FAILED
Information:Total time: 8.645 secs
Information:1 error
Information:0 warnings
Information:See complete output in console
Is there anyway i can solve this error ?? Any help will be appreciated.
Before this i was getting error mentioned in this question. But then i renamed the files from c to cpp, that solved the problem.
I am using Android Studio 1.2.2 with Android NDK r10e on Linuxmint 17.1. :)