【发布时间】:2015-02-07 14:58:19
【问题描述】:
我正在尝试为 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
【问题讨论】:
-
我没有安装 cygwin 或 mingw 并使用它们。
-
显示您的
Android.mk文件。 -
抱歉回复晚了,我放了android.mk代码。
标签: android eclipse android-ndk gstreamer