File tree Expand file tree Collapse file tree 7 files changed +43
-8
lines changed
browser_example/android/app
src/main/java/com/browser_example
testbed_native_android/android/app
src/main/java/io/branch/testbed_native_android
testbed_simple/android/app
src/main/java/com/testbed_simple
webview_example/android/app/src/main/java/com/webview_example Expand file tree Collapse file tree 7 files changed +43
-8
lines changed Original file line number Diff line number Diff line change @@ -97,6 +97,7 @@ android {
9797 applicationId " com.browser_example"
9898 minSdkVersion 16
9999 targetSdkVersion 22
100+ multiDexEnabled true
100101 versionCode 1
101102 versionName " 1.0"
102103 ndk {
Original file line number Diff line number Diff line change 11package com .browser_example ;
22
3- import android .app .Application ;
3+ import android .content .Context ;
4+ import android .support .multidex .MultiDex ;
5+ import android .support .multidex .MultiDexApplication ;
46
57import com .facebook .react .ReactApplication ;
68
1416import java .util .Arrays ;
1517import java .util .List ;
1618
17- public class MainApplication extends Application implements ReactApplication {
19+ public class MainApplication extends MultiDexApplication implements ReactApplication {
1820
1921 private final ReactNativeHost mReactNativeHost = new ReactNativeHost (this ) {
2022 @ Override
@@ -42,4 +44,10 @@ public void onCreate() {
4244 SoLoader .init (this , /* native exopackage */ false );
4345 Branch .getAutoInstance (this );
4446 }
47+
48+ @ Override
49+ protected void attachBaseContext (Context base ) {
50+ super .attachBaseContext (base );
51+ MultiDex .install (this );
52+ }
4553}
Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ android {
77 applicationId " io.branch.testbed_native_android"
88 minSdkVersion 16
99 targetSdkVersion 25
10+ multiDexEnabled true
1011 versionCode 1
1112 versionName " 1.0"
1213 testInstrumentationRunner " android.support.test.runner.AndroidJUnitRunner"
Original file line number Diff line number Diff line change 11package io .branch .testbed_native_android ;
22
3- import android .app .Application ;
3+ import android .content .Context ;
4+ import android .support .multidex .MultiDex ;
5+ import android .support .multidex .MultiDexApplication ;
46
57import io .branch .referral .Branch ;
68
79/**
810 * Created by jdee on 3/30/17.
911 */
1012
11- public class MainApplication extends Application {
13+ public class MainApplication extends MultiDexApplication {
1214 @ Override
1315 public void onCreate () {
1416 super .onCreate ();
1517 Branch .getAutoInstance (this );
1618 }
19+
20+ @ Override
21+ protected void attachBaseContext (Context base ) {
22+ super .attachBaseContext (base );
23+ MultiDex .install (this );
24+ }
1725}
Original file line number Diff line number Diff line change @@ -97,6 +97,7 @@ android {
9797 applicationId " com.testbed_simple"
9898 minSdkVersion 16
9999 targetSdkVersion 22
100+ multiDexEnabled true
100101 versionCode 1
101102 versionName " 1.0"
102103 ndk {
Original file line number Diff line number Diff line change 11package com .testbed_simple ;
22
3- import android .app .Application ;
3+ import android .content .Context ;
4+ import android .support .multidex .MultiDex ;
5+ import android .support .multidex .MultiDexApplication ;
46
57import com .facebook .react .ReactApplication ;
68import io .branch .rnbranch .RNBranchPackage ;
1416import java .util .Arrays ;
1517import java .util .List ;
1618
17- public class MainApplication extends Application implements ReactApplication {
19+ public class MainApplication extends MultiDexApplication implements ReactApplication {
1820
1921 private final ReactNativeHost mReactNativeHost = new ReactNativeHost (this ) {
2022 @ Override
@@ -42,4 +44,10 @@ public void onCreate() {
4244 SoLoader .init (this , /* native exopackage */ false );
4345 Branch .getAutoInstance (this );
4446 }
47+
48+ @ Override
49+ protected void attachBaseContext (Context base ) {
50+ super .attachBaseContext (base );
51+ MultiDex .install (this );
52+ }
4553}
Original file line number Diff line number Diff line change 11package com .webview_example ;
22
3- import android .app .Application ;
3+ import android .content .Context ;
4+ import android .support .multidex .MultiDex ;
5+ import android .support .multidex .MultiDexApplication ;
46
57import com .facebook .react .ReactApplication ;
68import io .branch .rnbranch .RNBranchPackage ;
1416import java .util .Arrays ;
1517import java .util .List ;
1618
17- public class MainApplication extends Application implements ReactApplication {
19+ public class MainApplication extends MultiDexApplication implements ReactApplication {
1820
1921 private final ReactNativeHost mReactNativeHost = new ReactNativeHost (this ) {
2022 @ Override
@@ -42,4 +44,10 @@ public void onCreate() {
4244 SoLoader .init (this , /* native exopackage */ false );
4345 Branch .getAutoInstance (this );
4446 }
47+
48+ @ Override
49+ protected void attachBaseContext (Context base ) {
50+ super .attachBaseContext (base );
51+ MultiDex .install (this );
52+ }
4553}
You can’t perform that action at this time.
0 commit comments