mirror of
https://github.com/zhigang1992/react-native-firebase.git
synced 2026-04-27 19:25:20 +08:00
docs(*): move enabling multidex to root
This commit is contained in:
@@ -1,33 +0,0 @@
|
||||
---
|
||||
title: Enabling Multidex
|
||||
description: The Cloud Firestore SDK on Android can sometimes cause Dex errors, learn how to fix them.
|
||||
---
|
||||
|
||||
The Android Firebase Firestore SDK is a large library, and in some scenarios it may bump you over the
|
||||
65k method limit on the Android build system.
|
||||
|
||||
If you have added Cloud Firestore as a dependency and your application build is now failing with the following error,
|
||||
you'll need to [enable multidex](https://developer.android.com/studio/build/multidex#mdex-gradle).
|
||||
|
||||
`Execution failed for task ':app:mergeDexDebug'.`
|
||||
|
||||
## Enabling Multidex
|
||||
|
||||
Open the `/android/app/build.gradle` file. Under `dependencies` we need to add the module, and then enable it
|
||||
within out `defaultConfig`:
|
||||
|
||||
```groovy
|
||||
android {
|
||||
defaultConfig {
|
||||
// ...
|
||||
multiDexEnabled true
|
||||
}
|
||||
// ...
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation 'com.android.support:multidex:1.0.3'
|
||||
}
|
||||
```
|
||||
|
||||
Once added, rebuild your application: `npx react-native run-android`.
|
||||
@@ -25,8 +25,8 @@ cd ios/ && pod install
|
||||
If you're using an older version of React Native without autolinking support, or wish to integrate into an existing project,
|
||||
you can follow the manual installation steps for [iOS](/firestore/usage/installation/ios) and [Android](firestore/usage/installation/android).
|
||||
|
||||
In some scenarios, your Android build may fail with the `app:mergeDexDebug` error. This required that multidex is enabled
|
||||
for your application. To learn more, read the [Enabling Multidex](/firestore/enabling-multidex) documentation.
|
||||
If you have started to receive a `app:mergeDexDebug` error after adding Cloud Firestore, please read the
|
||||
[Enabling Multidex](/enabling-multidex) documentation for more information on how to resolve this error.
|
||||
|
||||
# What does it do
|
||||
|
||||
|
||||
Reference in New Issue
Block a user