Reputation: 1244
I've installed the latest android SDK bundle as well as the latest android NDK on windows 7.
I've set up my environment and am able to run the hellojni example from the NDK installation package.
But when i try to add Gstreamer support according to the creating new projects section of the gstreamer android tutorial page, I get this error when i try to build my project:
GStreamer : [COMPILE] => gst-build/gstreamer_android.c
gst-build/gstreamer_android.c:1:17: fatal error: jni.h: No such file or directory
compilation terminated.
E:/GstreamerAndroid/sdk/share/gst-android/ndk-build//gstreamer.mk:167: recipe for
target `gst-build/gstreamer_android.o' failed
make: *** [gst-build/gstreamer_android.o] Error 1
I tried a few solutions such as setting my path variable to the jni.h in NDK (eg. ndkr8e\platforms\android-14\arch-arm\usr\include) but nothing works.
Can anyone suggest any other solutions?
EDIT: As suggested my iljan, i downloaded an older version of the android NDK (r8d), and i got my project to compile. But i don't understand whether the problem was from my side or a bug in the NDK version. Any thoughts?
Upvotes: 2
Views: 3451
Reputation: 2515
Following the comment to this issue, seems that adding
...
LOCAL_LDLIBS := -llog
SYSROOT := /opt/android-ndk-r8e/platforms/android-14/arch-arm/
include $(BUILD_SHARED_LIBRARY)
...
all work fine.
Upvotes: 1
Reputation: 11
The same problem for me with the NDK version r8e: I have set up the environment (eclipse, android sdk, ndk, cygwin) and successfuly compiled the hello-jni. But the Gstreamer Tutorial1 won't compile. My NDK install path was "C:\android\android-ndk-r8e"
But I was lucky enough to have previous ndk installed elsewhere on my disk, so I just copied it next to the never install, all files from: "C:\Program Files\Android\ndk\android-ndk-r8d" to "C:\android\android-ndk-r8d" and changed NDK location path in Eclipse: Window->Preferences->Android->NDK to this new folder.
Voila! It compiles now.
Upvotes: 1