fix(android): allow multidex support

This commit is contained in:
olivier bouillet 2022-04-23 21:52:08 +02:00
parent c4c723b5d5
commit 02b1399463
2 changed files with 4 additions and 1 deletions

View File

@ -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:+'
}

View File

@ -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