致命错误:gst / gst.h:没有这样的文件或目录

时间:2015-02-07 14:58:19

标签: android eclipse android-ndk gstreamer

我正在尝试为Android应用程序导入gstreamer项目。 (http://docs.gstreamer.com/display/GstSDK/Android+tutorials)。但是,坚持这些问题。

错误讯息:

fatal error: gst/gst.h: No such file or directory   
GStreamer cannot be resolved    Tutorial1.java  
make.exe: *** [gst-build/gstreamer_android.o] Error 1   
The import com.gstreamer cannot be resolved Tutorial1.java  

控制台输出:

23:40:21 **** Incremental Build of configuration Default for project Tutorial1 ****
"C:\\android-ndk-r9d-windows-x86_64\\android-ndk-r9d\\ndk-build.cmd" NDK_DEBUG=1 all 
Android NDK: WARNING: APP_PLATFORM android-19 is larger than android:minSdkVersion 9 in ./AndroidManifest.xml    
Package gstreamer-0.10 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gstreamer-0.10.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gstreamer-0.10' found
Package gstreamer-0.10 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gstreamer-0.10.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gstreamer-0.10' found
Package gstreamer-0.10 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gstreamer-0.10.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gstreamer-0.10' found
[armeabi] Gdbserver      : [arm-linux-androideabi-4.6] libs/armeabi/gdbserver
[armeabi] Gdbsetup       : libs/armeabi/gdb.setup
GStreamer      : [GEN] => gst-build/gstreamer_android.c
GStreamer      : [COMPILE] => gst-build/gstreamer_android.c
gst-build/gstreamer_android.c:2:21: fatal error: gst/gst.h: No such file or directory
compilation terminated.
make.exe: *** [gst-build/gstreamer_android.o] Error 1

我在Windows 8.1上使用ndk-9d和eclipse luna。

我在建议(http://docs.gstreamer.com/display/GstSDK/Installing+for+Android+development

上安装了所需的软件

我尝试将pkg_config_path指向gstreamer-0.10库所在的文件夹。但是没有解决。

我试图在android studio 1.0.2上导入相同的项目。我也有同样的错误。

我不知道如何解决问题。我试过ndk-10d(最新版本),但没有用。

这是我的Android.mk

LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)

LOCAL_MODULE    := tutorial-1
LOCAL_SRC_FILES := tutorial-1.c
LOCAL_SHARED_LIBRARIES := gstreamer_android
LOCAL_LDLIBS := -llog
include $(BUILD_SHARED_LIBRARY)

ifndef GSTREAMER_SDK_ROOT
ifndef GSTREAMER_SDK_ROOT_ANDROID
$(error GSTREAMER_SDK_ROOT_ANDROID is not defined!)
endif
GSTREAMER_SDK_ROOT        := $(GSTREAMER_SDK_ROOT_ANDROID)
endif
GSTREAMER_NDK_BUILD_PATH  := $(GSTREAMER_SDK_ROOT)/share/gst-android/ndk-build/
GSTREAMER_PLUGINS         := coreelements
include $(GSTREAMER_NDK_BUILD_PATH)/gstreamer.mk

1 个答案:

答案 0 :(得分:0)

我发现eclipse无法引用gstreamer包的原因。 gstreamer文件夹包含非英语语言。 Eclipse没有正确读取路径。

您最好查看源文件," org.eclipse.cdt.core.prefs"在.setting。 然后,查看路径是否正确。