File tree Expand file tree Collapse file tree 4 files changed +46
-35
lines changed Expand file tree Collapse file tree 4 files changed +46
-35
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ title : Enabling Multidex
3
+ description : Learn how to enable multidex on your Android application.
4
+ ---
5
+
6
+ As more native dependencies are added to your project, it may bump you over the
7
+ 64k method limit on the Android build system. Once this limit has been reached, you will start to see the following error
8
+ whilst attempting to build your Android application:
9
+
10
+ ```
11
+ Execution failed for task ':app:mergeDexDebug'.
12
+ ```
13
+
14
+ To learn more about multidex, view the offical [ Android documentation] ( https://developer.android.com/studio/build/multidex#mdex-gradle ) .
15
+
16
+ ## Enabling Multidex
17
+
18
+ Open the ` /android/app/build.gradle ` file. Under ` dependencies ` we need to add the module, and then enable it
19
+ within out ` defaultConfig ` :
20
+
21
+ ``` groovy
22
+ android {
23
+ defaultConfig {
24
+ // ...
25
+ multiDexEnabled true
26
+ }
27
+ // ...
28
+ }
29
+
30
+ dependencies {
31
+ implementation 'com.android.support:multidex:1.0.3'
32
+ }
33
+ ```
34
+
35
+ Once added, rebuild your application: ` npx react-native run-android ` .
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -25,8 +25,8 @@ cd ios/ && pod install
25
25
If you're using an older version of React Native without autolinking support, or wish to integrate into an existing project,
26
26
you can follow the manual installation steps for [ iOS] ( /firestore/usage/installation/ios ) and [ Android] ( firestore/usage/installation/android ) .
27
27
28
- In some scenarios, your Android build may fail with the ` app:mergeDexDebug ` error. This required that multidex is enabled
29
- for your application. To learn more, read the [ Enabling Multidex] ( /firestore/ enabling-multidex ) documentation.
28
+ If you have started to receive a ` app:mergeDexDebug ` error after adding Cloud Firestore, please read the
29
+ [ Enabling Multidex] ( /enabling-multidex ) documentation for more information on how to resolve this error .
30
30
31
31
# What does it do
32
32
Original file line number Diff line number Diff line change @@ -156,6 +156,15 @@ you can follow the manual installation steps for [iOS](/install-ios) and [Androi
156
156
157
157
# Miscellaneous
158
158
159
+ ## Android Enabling Multidex
160
+
161
+ As your application starts to grow with more native dependencies, your builds may start to fail with the common
162
+ ` Execution failed for task ':app:mergeDexDebug' ` error. This error occurs when Android reaches the
163
+ [ 64k methods] ( https://developer.android.com/studio/build/multidex ) limit.
164
+
165
+ One common solution is to [ enable multidex] ( /enabling-multidex ) support for Android. This is a common solution to solving
166
+ the problem, however it is recommended you read the Android documentation to understand how it may impact your application.
167
+
159
168
## Hermes Support
160
169
161
170
At this time, React Native Firebase does not support the [ Hermes] ( https://hermesengine.dev/ ) JavaScript engine due to
You can’t perform that action at this time.
0 commit comments