无法为Android教程构建GStreamer [英] Unable to build GStreamer for Android Tutorials

查看:64
本文介绍了无法为Android教程构建GStreamer的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在尝试构建GStreamer Android教程时遇到了许多问题.

I'm running into a number of issues attempting to build the GStreamer Android tutorials.

我的环境是:

  • Mac OS X 7
  • Android SDK版本17
  • Android NDK 8d

我能够在Eclipse和命令行中构建和运行NDK示例.

I am able to build and run the NDK samples both in Eclipse and from the command line.

我已经下载了 http://cdn.gstreamer. com/android/arm/gstreamer-sdk-android-arm-debug-2012.11.tar.bz2 ,然后将GSTREAMER_SDK_ROOT_ANDROID环境变量添加到我的.bash_profile中.

I have downloaded http://cdn.gstreamer.com/android/arm/gstreamer-sdk-android-arm-debug-2012.11.tar.bz2 and added the GSTREAMER_SDK_ROOT_ANDROID environment variable to my .bash_profile.

当我尝试通过Eclipse构建android-tutorial-1时,出现以下错误:

When I try to build android-tutorial-1 via Eclipse I get the following error:

12:12:05 **** Incremental Build of configuration Default for project Tutorial1 ****
/apps/tools/android-ndk-r8d/ndk-build all 
jni/Android.mk:13: *** GSTREAMER_SDK_ROOT_ANDROID is not defined!.  Stop.

12:12:05 Build Finished (took 104ms)

我尝试将GSTREAMER_SDK_ROOT_ANDROID添加到Eclispe中的C ++构建变量中,但这没什么区别.

I have tried adding GSTREAMER_SDK_ROOT_ANDROID to the C++ build variables in Eclispe but it makes no difference.

当我尝试通过命令行进行构建时,出现以下错误:

When I try to build via the command line I get the following error:

/bin/sh: pkg-config: command not found
/bin/sh: pkg-config: command not found
/bin/sh: pkg-config: command not found
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: *** [gst-build/gstreamer_android.o] Error 1

我不知道gst/gst.h无法解决吗?

What I can't figure out is gst/gst.h can not be resolved?

推荐答案

我将上述问题发布在GStreamer Android邮件列表上,并得到以下响应:

I posted the above question on the GStreamer Android mailing list and got the following response:

不幸的是,我们忘记了在此版本的Mac OS X中包含pkg-config. 你可以在这里下载: http://macpkg.sourceforge.net/

Hi, Unfortunately we forgot to include pkg-config in this release for Mac OS X. You can download it from here: http://macpkg.sourceforge.net/

我使用自制软件安装了pkg-config,并且能够使用ndk-build通过命令行构建所有Android教程.

I used homebrew to install pkg-config and was able to build all of the Android Tutorials via the command line using ndk-build.

在Eclipse中我仍然有很多问题:

I still have a number of issues in Eclipse:

  1. * GSTREAMER_SDK_ROOT_ANDROID未定义! -我无法让Eclipse选择此变量
  2. 如果我将变量硬编码到make文件中,那么我会得到/bin/sh: pkg-config: command not found-pkg-config已安装并通过CLI工作
  1. * GSTREAMER_SDK_ROOT_ANDROID is not defined! - I can not get Eclipse to pick up this variable
  2. If I hard code the variable into the make file I then get /bin/sh: pkg-config: command not found - pkg-config is installed and working via the CLI

我相信某些问题与Android 问题33788 ,并且我尝试使用CDT 8.0.2而不是CDT 8.10来解决它们,但是它不能解决上述两个问题.

I believe some of the issues are related to Android Issue 33788 and I have attempted to resolve them using CDT 8.0.2 instead of CDT 8.10 but it did not solve either of the above issues.

我现在通过以下操作解决了这个问题:

I have worked around the problem for now by doing the following:

  1. 为我的项目禁用了CDT构建
  2. 使用CLI ndk-build构建NDK代码
  3. 像往常一样通过Eclipse构建应用程序并将其部署到我的设备上

这篇关于无法为Android教程构建GStreamer的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆