Android Gstreamer SDK教程错误

时间:2016-07-25 08:11:52

标签: android gstreamer

我正在尝试测试Android Gstreamer。 所以我安装并配置了路径SDK,获得了tutorial source,在教程的Android.mk中修改了路径,并在android-tutorial-1 / jni中进行了ndk-build。 但我得到了

$ ndk-build
GStreamer      : [GEN] => gst-build-arm64-v8a/gstreamer_android.c
GStreamer      : [COMPILE] => gst-build-arm64-v8a/gstreamer_android.c
GStreamer      : [LINK] => gst-build-arm64-v8a/libgstreamer_android.so
/home/potato/Android/NDK/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/bin/../lib/gcc/aarch64-linux-android/4.9.x/../../../../aarch64-linux-android/bin/ld.gold: error: /home/potato/Android/GST/lib/gstreamer-1.0/static/libgstcoreelements.a(libgstcoreelements_la-gstelements.o): incompatible target
/home/potato/Android/NDK/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/bin/../lib/gcc/aarch64-linux-android/4.9.x/../../../../aarch64-linux-android/bin/ld.gold: error: /home/potato/Android/GST/lib/libgstreamer-1.0.a(libgstreamer_1.0_la-gst.o): incompatible target
/home/potato/Android/NDK/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/bin/../lib/gcc/aarch64-linux-android/4.9.x/../../../../aarch64-linux-android/bin/ld.gold: error: /home/potato/Android/GST/lib/libgstreamer-1.0.a(libgstreamer_1.0_la-gstobject.o): incompatible target
/home/potato/Android/NDK/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/bin/../lib/gcc/aarch64-linux-android/4.9.x/../../../../aarch64-linux-android/bin/ld.gold: error: /home/potato/Android/GST/lib/libgstreamer-1.0.a(libgstreamer_1.0_la-gstallocator.o): incompatible target
/home/potato/Android/NDK/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/bin/../lib/gcc/aarch64-linux-android/4.9.x/../../../../aarch64-linux-android/bin/ld.gold: error: /home/potato/Android/GST/lib/libgstreamer-1.0.a(libgstreamer_1.0_la-gstbin.o): incompatible target
/home/potato/Android/NDK/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/bin/../lib/gcc/aarch64-linux-android/4.9.x/../../../../aarch64-linux-android/bin/ld.gold: error: /home/potato/Android/GST/lib/libgstreamer-1.0.a(libgstreamer_1.0_la-gstbuffer.o): incompatible target
/home/potato/Android/NDK/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/bin/../lib/gcc/aarch64-linux-android/4.9.x/../../../../aarch64-linux-android/bin/ld.gold: error: /home/potato/Android/GST/lib/libgstreamer-1.0.a(libgstreamer_1.0_la-gstbufferlist.o): incompatible target
/home/potato/Android/NDK/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/bin/../lib/gcc/aarch64-linux-android/4.9.x/../../../../aarch64-linux-android/bin/ld.gold: error: /home/potato/Android/GST/lib/libgstreamer-1.0.a(libgstreamer_1.0_la-gstbufferpool.o): incompatible target
/home/potato/Android/NDK/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/bin/../lib/gcc/aarch64-linux-android/4.9.x/../../../../aarch64-linux-android/bin/ld.gold: error: /home/potato/Android/GST/lib/libgstreamer-1.0.a(libgstreamer_1.0_la-gstbus.o): incompatible target
/home/potato/Android/NDK/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/bin/../lib/gcc/aarch64-linux-android/4.9.x/../../../../aarch64-linux-android/bin/ld.gold: error: /home/potato/Android/GST/lib/libgstreamer-1.0.a(libgstreamer_1.0_la-gstcaps.o): incompatible target
/home/potato/Android/NDK/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/bin/../lib/gcc/aarch64-linux-android/4.9.x/../../../../aarch64-linux-android/bin/ld.gold: error: /home/potato/Android/GST/lib/libgstreamer-1.0.a(libgstreamer_1.0_la-gstcapsfeatures.o): incompatible target
/home/potato/Android/NDK/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/bin/../lib/gcc/aarch64-linux-android/4.9.x/../../../../aarch64-linux-android/bin/ld.gold: error: /home/potato/Android/GST/lib/libgstreamer-1.0.a(libgstreamer_1.0_la-gstchildproxy.o): incompatible target
/home/potato/Android/NDK/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/bin/../lib/gcc/aarch64-linux-android/4.9.x/../../../../aarch64-linux-android/bin/ld.gold: error: /home/potato/Android/GST/lib/libgstreamer-1.0.a(libgstreamer_1.0_la-gstclock.o): incompatible target
/home/potato/Android/NDK/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/bin/../lib/gcc/aarch64-linux-android/4.9.x/../../../../aarch64-linux-android/bin/ld.gold: error: /home/potato/Android/GST/lib/libgstreamer-1.0.a(libgstreamer_1.0_la-gstclock-linreg.o): incompatible target
/home/potato/Android/NDK/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/bin/../lib/gcc/aarch64-linux-android/4.9.x/../../../../aarch64-linux-android/bin/ld.gold: error: /home/potato/Android/GST/lib/libgstreamer-1.0.a(libgstreamer_1.0_la-gstcontext.o): incompatible target
/home/potato/Android/NDK/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/bin/../lib/gcc/aarch64-linux-android/4.9.x/../../../../aarch64-linux-android/bin/ld.gold: error: /home/potato/Android/GST/lib/libgstreamer-1.0.a(libgstreamer_1.0_la-gstcontrolbinding.o): incompatible target
/home/potato/Android/NDK/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/bin/../lib/gcc/aarch64-linux-android/4.9.x/../../../../aarch64-linux-android/bin/ld.gold: error: /home/potato/Android/GST/lib/libgstreamer-1.0.a(libgstreamer_1.0_la-gstcontrolsource.o): incompatible target
/home/potato/Android/NDK/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/bin/../lib/gcc/aarch64-linux-android/4.9.x/../../../../aarch64-linux-android/bin/ld.gold: error: /home/potato/Android/GST/lib/libgstreamer-1.0.a(libgstreamer_1.0_la-gstdatetime.o): incompatible target
/home/potato/Android/NDK/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/bin/../lib/gcc/aarch64-linux-android/4.9.x/../../../../aarch64-linux-android/bin/ld.gold: error: /home/potato/Android/GST/lib/libgstreamer-1.0.a(libgstreamer_1.0_la-gstdebugutils.o): incompatible target
/home/potato/Android/NDK/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/bin/../lib/gcc/aarch64-linux-android/4.9.x/../../../../aarch64-linux-android/bin/ld.gold: error: /home/potato/Android/GST/lib/libgstreamer-1.0.a(libgstreamer_1.0_la-gstdevice.o): incompatible target
/home/potato/Android/NDK/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/bin/../lib/gcc/aarch64-linux-android/4.9.x/../../../../aarch64-linux-android/bin/ld.gold: error: /home/potato/Android/GST/lib/libgstreamer-1.0.a(libgstreamer_1.0_la-gstdevicemonitor.o): incompatible target
/home/potato/Android/NDK/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/bin/../lib/gcc/aarch64-linux-android/4.9.x/../../../../aarch64-linux-android/bin/ld.gold: error: /home/potato/Android/GST/lib/libgstreamer-1.0.a(libgstreamer_1.0_la-gstdeviceprovider.o): incompatible target
...
/home/potato/Android/NDK/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/bin/../lib/gcc/aarch64-linux-android/4.9.x/../../../../aarch64-linux-android/bin/ld.gold: error: /home/potato/Android/GST/lib/libglib-2.0.a(libglib_2_0_la-gstring.o): incompatible target
/home/potato/Android/NDK/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/bin/../lib/gcc/aarch64-linux-android/4.9.x/../../../../aarch64-linux-android/bin/ld.gold: error: /home/potato/Android/GST/lib/libglib-2.0.a(libglib_2_0_la-gthread.o): incompatible target
/home/potato/Android/NDK/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/bin/../lib/gcc/aarch64-linux-android/4.9.x/../../../../aarch64-linux-android/bin/ld.gold: error: /home/potato/Android/GST/lib/libglib-2.0.a(libglib_2_0_la-gutf8.o): incompatible target
gst-build-arm64-v8a/gstreamer_android.c:27: error: undefined reference to 'gst_plugin_coreelements_register'
gst-build-arm64-v8a/gstreamer_android.c:70: error: undefined reference to 'g_utf8_get_char_validated'
gst-build-arm64-v8a/gstreamer_android.c:79: error: undefined reference to 'g_strdup_printf'
gst-build-arm64-v8a/gstreamer_android.c:80: error: undefined reference to 'g_string_erase'
gst-build-arm64-v8a/gstreamer_android.c:81: error: undefined reference to 'g_string_insert'
gst-build-arm64-v8a/gstreamer_android.c:85: error: undefined reference to 'g_free'
gst-build-arm64-v8a/gstreamer_android.c:103: error: undefined reference to 'g_strdup_printf'
...
gst-build-arm64-v8a/gstreamer_android.c:540: error: undefined reference to 'g_module_open'
gst-build-arm64-v8a/gstreamer_android.c:544: error: undefined reference to 'g_module_symbol'
gst-build-arm64-v8a/gstreamer_android.c:548: error: undefined reference to 'g_module_close'
collect2: error: ld returned 1 exit status
/home/potato/Android/GST/share/gst-android/ndk-build/gstreamer-1.0.mk:229: recipe for target 'buildsharedlibrary_arm64-v8a' failed
make: *** [buildsharedlibrary_arm64-v8a] Error 1

PLUS

当我使用arm-1.9.1,arm64-1.9.1或x86-1.9.1时,我得到相同的消息

Information:Gradle tasks [:app:clean, :app:generateDebugSources, :app:generateDebugAndroidTestSources, :app:mockableAndroidJar, :app:prepareDebugUnitTestDependencies, :app:assembleDebug]
:app:ndkClean
src/main/jni/Android.mk:23: *** Target arch ABI not supported.  Stop.
Error:Execution failed for task ':app:ndkClean'.
> Process 'command 'C:\Users\Jinwoo\AppData\Local\Android\NDK/ndk-build.cmd'' finished with non-zero exit value 2
Information:BUILD FAILED
Information:Total time: 4 mins 46.216 secs
Information:1 error
Information:0 warnings
Information:See complete output in console

x86_64-1.9.1

Information:Gradle tasks [:app:clean, :app:generateDebugSources, :app:mockableAndroidJar, :app:prepareDebugUnitTestDependencies, :app:generateDebugAndroidTestSources, :app:assembleDebug]
:app:ndkClean
src/main/jni/Android.mk:35: C:\Users\Jinwoo/AppData/Local/Android/gstreamer-1.0-android-x86_64-1.9.1/share/gst-android/ndk-build//plugins.mk: No such file or directory
src/main/jni/Android.mk:39: C:\Users\Jinwoo/AppData/Local/Android/gstreamer-1.0-android-x86_64-1.9.1/share/gst-android/ndk-build//gstreamer-1.0.mk: No such file or directory
src/main/jni/Android.mk:35: C:\Users\Jinwoo/AppData/Local/Android/gstreamer-1.0-android-x86_64-1.9.1/share/gst-android/ndk-build//plugins.mk: No such file or directory
src/main/jni/Android.mk:39: C:\Users\Jinwoo/AppData/Local/Android/gstreamer-1.0-android-x86_64-1.9.1/share/gst-android/ndk-build//gstreamer-1.0.mk: No such file or directory
src/main/jni/Android.mk:23: *** Target arch ABI not supported.  Stop.
Error:Execution failed for task ':app:ndkClean'.
> Process 'command 'C:\Users\Jinwoo\AppData\Local\Android\NDK/ndk-build.cmd'' finished with non-zero exit value 2
Information:BUILD FAILED
Information:Total time: 3.126 secs
Information:1 error
Information:0 warnings
Information:See complete output in console

2 个答案:

答案 0 :(得分:3)

您使用的教程实际上并非来自GStreamer,而是来自第三方,现在已经很老了。我还没有能够使用Android Studio,只有Eclipse。如果您想使用最新的Android GStreamer,我建议您查看this Github project

它应该可以直接使用GStreamer SDK 1.8.0或更高版本。您需要的唯一更改是在build.gradle文件中,在getNdkCommandLine(ndkRoot, target)方法中将gstRoot变量设置为GStreamer SDK的路径。

答案 1 :(得分:0)

请参阅gstreamer-devel,您可能错过了Android更新