I have been trying to upgrade GStreamer to version 1.16 from 1.14 in my android application but have encountered some problems. Version 1.16 requires, according to gstreamer's website, Android NDK r18b. When I try to run GStreamer 1.16 with NDK r18b I get an error in android studio:
Expected ndk stl shared object file at /home/exjobb/Documents/android-ndk-r18-b-linux-x86_64/android-ndk-r18b/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi-v7a /libgnustl_shared.so
The cxx-stl folder is not on my computer, nor are the folders / files that come after.
I have googled and it seems that a general recommendation is to downgrade to r17c. I can't do that if GStreamer 1.16 requires r18b.
What could be the issue here?
EDIT:
I have two different build.gradle files.
Here is the first one:
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
defaultConfig {
applicationId "se.liu.mrleo"
minSdkVersion 23
versionCode 1
versionName "1.0"
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 not set')
arguments "NDK_APPLICATION_MK=jni/Application.mk",
"GSTREAMER_JAVA_SRC_DIR=src",
"GSTREAMER_ROOT_ANDROID=$gstRoot",
"GSTREAMER_ASSETS_DIR=src/main/assets"
targets "gstmredge"
abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
}
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src']
resources.srcDirs = ['src']
aidl.srcDirs = ['src']
renderscript.srcDirs = ['src']
res.srcDirs = ['res']
assets.srcDirs = ['assets']
}
}
}
}
externalNativeBuild {
ndkBuild {
path 'jni/Android.mk'
//path 'jni/Application.mk'
}
}
buildToolsVersion = '28.0.3'
compileOptions {
sourceCompatibility = '1.8'
targetCompatibility = '1.8'
}
}
afterEvaluate {
if (project.hasProperty('compileDebugJavaWithJavac')) {
project.compileDebugJavaWithJavac.dependsOn 'externalNativeBuildDebug'
}
if (project.hasProperty('compileReleaseJavaWithJavac')) {
project.compileReleaseJavaWithJavac.dependsOn 'externalNativeBuildRelease'
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
api project(':rtplibrary')
// Edge
implementation 'com.obsez.android.lib.filechooser:filechooser:1.1.19'
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:design:28.0.0'
// ARCore
implementation 'de.javagl:obj:0.3.0'
implementation 'com.google.ar:core:1.9.0'
}
And this is the sencond one;
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.6.3'
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
google()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}