0

Iam getting error on setting up my ndk for gstreamer library in android studio.

Below is the error which iam getting-:

cerbero.git/1.16/build/sources/android_universal/armv7/glib-2.56.1/_builddir/../glib/gconvert.c:308: error: undefined reference to 'libiconv_close'

My project level gradle is -:

> buildscript {
>     repositories {
>         jcenter()
>         google()
>     }
>     dependencies {
>         classpath 'com.android.tools.build:gradle:3.5.0'
>     } }
> 
> allprojects {
>     repositories {
>         jcenter()
>         google()
>     } }

and my app.gradle is -:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 26
    buildToolsVersion "26.0.0"

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

        ndk {
            moduleName "tutorial-2"
            abiFilters 'x86', 'armeabi-v7a', 'arm64-v8a'
        }
    }

    buildTypes {
        release {

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

Refrences which iam using is from-:

Gstreamer examples in Android Studio

Also can anybody help with good references for implemeting gstream library in android studio

Thanks

Dheeraj
  • 869
  • 1
  • 7
  • 13

1 Answers1

0

Try to add libiconv to your Android.mk file

GSTREAMER_NDK_BUILD_PATH  := $(GSTREAMER_ROOT)/share/gst-android/ndk-build
include $(GSTREAMER_NDK_BUILD_PATH)/plugins.mk
GSTREAMER_PLUGINS         := $(GSTREAMER_PLUGINS_CORE) $(GSTREAMER_PLUGINS_NET) x264 openh264 videoparsersbad mulaw
G_IO_MODULES              := gnutls
GSTREAMER_EXTRA_LIBS      := -liconv #This is what you need
include $(GSTREAMER_NDK_BUILD_PATH)/gstreamer-1.0.mk