From 02b1399463c7f6869aec4648f4d094aeb0f71192 Mon Sep 17 00:00:00 2001 From: olivier bouillet Date: Sat, 23 Apr 2022 21:52:08 +0200 Subject: [PATCH] fix(android): allow multidex support --- examples/basic/android/app/build.gradle | 2 ++ .../app/src/main/java/com/videoplayer/MainApplication.java | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/examples/basic/android/app/build.gradle b/examples/basic/android/app/build.gradle index 082873d4..dcde52e3 100644 --- a/examples/basic/android/app/build.gradle +++ b/examples/basic/android/app/build.gradle @@ -97,6 +97,7 @@ android { applicationId "com.videoplayer" minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion + multiDexEnabled true versionCode 1 versionName "1.0" ndk { @@ -136,6 +137,7 @@ android { dependencies { implementation project(':react-native-video') + implementation 'com.android.support:multidex:1.0.3' implementation "com.facebook.react:react-native:+" // From node_modules implementation 'org.webkit:android-jsc:+' } diff --git a/examples/basic/android/app/src/main/java/com/videoplayer/MainApplication.java b/examples/basic/android/app/src/main/java/com/videoplayer/MainApplication.java index a2698415..382b9d8f 100644 --- a/examples/basic/android/app/src/main/java/com/videoplayer/MainApplication.java +++ b/examples/basic/android/app/src/main/java/com/videoplayer/MainApplication.java @@ -2,6 +2,7 @@ package com.videoplayer; import android.app.Application; +import androidx.multidex.MultiDexApplication; import com.facebook.react.ReactApplication; import com.brentvatne.react.ReactVideoPackage; import com.facebook.react.ReactNativeHost; @@ -12,7 +13,7 @@ import com.facebook.soloader.SoLoader; import java.util.Arrays; import java.util.List; -public class MainApplication extends Application implements ReactApplication { +public class MainApplication extends MultiDexApplication implements ReactApplication { private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) { @Override