1

Estoy intentando compilar GStreamer 1.14.1 para Android Studio 3.3 sin éxito alguno. El error que estoy obteniendo es el siguiente:

Build command failed.
Error while executing process /home/folavarria/Android/Sdk/ndk-bundle/ndk-build with arguments {NDK_PROJECT_PATH=null APP_BUILD_SCRIPT=/home/folavarria/Projects/gstreamer-tutorial2/app/src/main/jni/Android.mk NDK_APPLICATION_MK=/home/folavarria/Projects/gstreamer-tutorial2/app/src/main/jni/Application.mk APP_ABI=armeabi-v7a NDK_ALL_ABIS=armeabi-v7a NDK_DEBUG=1 APP_PLATFORM=android-16 NDK_OUT=/home/folavarria/Projects/gstreamer-tutorial2/app/build/intermediates/ndkBuild/debug/obj NDK_LIBS_OUT=/home/folavarria/Projects/gstreamer-tutorial2/app/build/intermediates/ndkBuild/debug/lib NDK_APPLICATION_MK=src/main/jni/Application.mk GSTREAMER_JAVA_SRC_DIR=src GSTREAMER_ROOT_ANDROID=/home/folavarria/Android/Sdk/gstreamer/1.14.1 GSTREAMER_ASSETS_DIR=src/assets gst-build-armeabi-v7a/libgstreamer_android.so}
GStreamer      : [GEN] => gst-build-armeabi-v7a/gstreamer_android.c
GStreamer      : [COMPILE] => gst-build-armeabi-v7a/gstreamer_android.c

clang: error: argument unused during compilation: '-mfpu=vfpv3-d16' [-Werror,-Wunused-command-line-argument]
make: *** [gst-build-armeabi-v7a/gstreamer_android.o] Error 1

Este es mi archivo build.gradle:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 26
    buildToolsVersion "28.0.3"

    defaultConfig {
        applicationId "org.freedesktop.gstreamer.tutorials.tutorial_2"
        minSdkVersion 9
        targetSdkVersion 14    

        externalNativeBuild {
            ndkBuild {
                def gstRoot

                if (project.hasProperty('gstAndroidRoot'))
                    gstRoot = project.gstAndroidRoot
                else
                    gstRoot = System.env.GSTREAMER_ROOT_ANDROID

                if (gstRoot == null)
                    throw new FileNotFoundException('GSTREAMER_ROOT_ANDROID must be set, or "gstAndroidRoot" must be defined in your gradle.properties in the top level directory of the unpacked universal GStreamer Android binaries')

                arguments "NDK_APPLICATION_MK=src/main/jni/Application.mk", "GSTREAMER_JAVA_SRC_DIR=src", "GSTREAMER_ROOT_ANDROID=$gstRoot", "GSTREAMER_ASSETS_DIR=src/assets"

                targets "tutorial-2", "gstreamer_android"

                // All archs except MIPS and MIPS64 are supported
                abiFilters  'armeabi-v7a'
            }
        }
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
        }
    }
    externalNativeBuild {
        ndkBuild {
            path '../../gstreamer-tutorial2/app/src/main/jni/Android.mk'
        }
    }
}

Edit: Esto se resuelve utilizando GStreamer 1.15.1 para android, pero ahora obtengo otro error en Android.mk el cual es:

SYSROOT_LINK not defined

Esto se arregla comentando la línea 168 en GStreamer.mk que se ubica en Android/Sdk/gstreamer/armv7/shared/gst-android/ndk-build.

ifdef SYSROOT
    SYSROOT_GST_INC := $(SYSROOT)
    SYSROOT_GST_LINK := $(SYSROOT)
else
    ifdef SYSROOT_INC
        #$(call assert-defined, SYSROOT_LINK)
        ifdef SYSROOT_LINK
            SYSROOT_GST_INC := $(SYSROOT_INC)
            SYSROOT_GST_LINK := $(SYSROOT_LINK)
        endif
    else
        SYSROOT_GST_INC := $(NDK_PLATFORMS_ROOT)/$(TARGET_PLATFORM)/arch-$(TARGET_ARCH)
        SYSROOT_GST_LINK := $(SYSROOT_GST_INC)
    endif
endif

Ahora funciona bien, pero no parece ser la solución adecuada.

0

Tu Respuesta

By clicking “Publica tu respuesta”, you agree to our terms of service and acknowledge you have read our privacy policy.

Examina otras preguntas con la etiqueta o formula tu propia pregunta.