-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs(*): move enabling multidex to root
- Loading branch information
Showing
4 changed files
with
46 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
--- | ||
title: Enabling Multidex | ||
description: Learn how to enable multidex on your Android application. | ||
--- | ||
|
||
As more native dependencies are added to your project, it may bump you over the | ||
64k method limit on the Android build system. Once this limit has been reached, you will start to see the following error | ||
whilst attempting to build your Android application: | ||
|
||
``` | ||
Execution failed for task ':app:mergeDexDebug'. | ||
``` | ||
|
||
To learn more about multidex, view the offical [Android documentation](https://developer.android.com/studio/build/multidex#mdex-gradle). | ||
|
||
## 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' | ||
This comment has been minimized.
Sorry, something went wrong. |
||
} | ||
``` | ||
|
||
Once added, rebuild your application: `npx react-native run-android`. |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Ehesp should be androidx now?
implementation 'androidx.multidex:multidex:2.0.1'
Also, it needs a change to MainApplication.java, specifically an extra import and a change to extends: