diff --git a/app/build.gradle b/app/build.gradle index fd54c11..aee5519 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -1,15 +1,16 @@ apply plugin: 'com.android.application' android { - compileSdkVersion 23 - buildToolsVersion '27.0.3' + compileSdkVersion 28 + buildToolsVersion "28.0.3" defaultConfig { applicationId "org.freedesktop.gstreamer.rtsp_example" minSdkVersion 15 - targetSdkVersion 15 + targetSdkVersion 28 versionCode 1 versionName "1.0" + multiDexEnabled true //https://developer.android.com/studio/build/multidex For apps more than 64K methods in all externalNativeBuild { @@ -39,10 +40,10 @@ android { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' - sourceSets { + sourceSets { main { manifest.srcFile 'AndroidManifest.xml' - java.srcDirs = ['src'] + java.srcDirs = ['src'] resources.srcDirs = ['src'] aidl.srcDirs = ['src'] renderscript.srcDirs = ['src'] @@ -58,6 +59,10 @@ android { path 'jni/Android.mk' } } + compileOptions { + sourceCompatibility = 1.8 + targetCompatibility = 1.8 + } } afterEvaluate { @@ -65,7 +70,8 @@ afterEvaluate { } dependencies { + implementation 'com.android.support:multidex:1.0.1' implementation fileTree(dir: 'libs', include: ['*.jar']) testImplementation 'junit:junit:4.12' - implementation 'com.android.support:appcompat-v7:23.1.1' -} + implementation 'com.android.support:appcompat-v7:28.0.0' +} \ No newline at end of file diff --git a/app/jni/Android.mk b/app/jni/Android.mk index 226ca2d..c4478e2 100644 --- a/app/jni/Android.mk +++ b/app/jni/Android.mk @@ -3,7 +3,7 @@ LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) LOCAL_MODULE := rtsp-example -LOCAL_SRC_FILES := rtsp-example.c +LOCAL_SRC_FILES := rtsp-example.c dummy.cpp LOCAL_SHARED_LIBRARIES := gstreamer_android LOCAL_LDLIBS := -llog -landroid include $(BUILD_SHARED_LIBRARY) @@ -27,5 +27,6 @@ endif 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_PLAYBACK) $(GSTREAMER_PLUGINS_CODECS) $(GSTREAMER_PLUGINS_NET) $(GSTREAMER_PLUGINS_SYS) -GSTREAMER_EXTRA_DEPS := gstreamer-video-1.0 -include $(GSTREAMER_NDK_BUILD_PATH)/gstreamer-1.0.mk +GSTREAMER_EXTRA_DEPS := gstreamer-video-1.0 gobject-2.0 +GSTREAMER_EXTRA_LIBS := -liconv +include $(GSTREAMER_NDK_BUILD_PATH)/gstreamer-1.0.mk \ No newline at end of file diff --git a/app/jni/Application.mk b/app/jni/Application.mk index b8848e8..1f4ab31 100644 --- a/app/jni/Application.mk +++ b/app/jni/Application.mk @@ -1 +1,2 @@ APP_ABI = armeabi armeabi-v7a arm64-v8a x86 x86_64 +APP_STL = c++_shared \ No newline at end of file diff --git a/app/jni/dummy.cpp b/app/jni/dummy.cpp new file mode 100644 index 0000000..e69de29 diff --git a/build.gradle b/build.gradle index 3446a28..d327b2a 100644 --- a/build.gradle +++ b/build.gradle @@ -6,7 +6,7 @@ buildscript { google() } dependencies { - classpath 'com.android.tools.build:gradle:3.1.2' + classpath 'com.android.tools.build:gradle:3.5.3' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files @@ -16,10 +16,10 @@ buildscript { allprojects { repositories { jcenter() - google() + google() } } task clean(type: Delete) { delete rootProject.buildDir -} +} \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 205e07c..3a28790 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip \ No newline at end of file