Android Gstreamer SDK教程错误
Android Gstreamer SDK tutorial error
我正在尝试测试 Android Gstreamer。
所以我安装并配置了路径 SDK, got 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
查看gstreamer-devel,您可能错过了android更新
您使用的那个教程实际上不是来自 GStreamer,而是来自第三方,而且现在已经很旧了。我无法让它与 Android Studio 一起使用,只能与 Eclipse 一起使用。如果您想使用最新的 Android GStreamer,我建议您查看 this Github project.
它应该开箱即用,适用于 GStreamer SDK 1.8.0 或更高版本。您需要做的唯一更改是在 build.gradle 文件中,在 getNdkCommandLine(ndkRoot, target)
方法中将 gstRoot
变量设置为 GStreamer SDK 的路径。
我正在尝试测试 Android Gstreamer。 所以我安装并配置了路径 SDK, got 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
查看gstreamer-devel,您可能错过了android更新
您使用的那个教程实际上不是来自 GStreamer,而是来自第三方,而且现在已经很旧了。我无法让它与 Android Studio 一起使用,只能与 Eclipse 一起使用。如果您想使用最新的 Android GStreamer,我建议您查看 this Github project.
它应该开箱即用,适用于 GStreamer SDK 1.8.0 或更高版本。您需要做的唯一更改是在 build.gradle 文件中,在 getNdkCommandLine(ndkRoot, target)
方法中将 gstRoot
变量设置为 GStreamer SDK 的路径。