Navigate back to the homepage

Task transform dex archive with dex merger for debug failed in react native

Infinitbility
React Native
April 25th, 2021 · 1 min read
Task transform dex archive with dex merger for debug failed in react native

Hello Friends 👋,

Welcome To Infinitbility! ❤️

In this article, you will solve your Task :app:transformDexArchiveWithDexMergerForDebug FAILED issue in your application.

If your methods + your dependencies method greater then 64k+ methods then your react native throwing DexMerger error.

Follow some simple steps you absolutely solved this error.

Task :app:transformDexArchiveWithDexMergerForDebug

Step 1: Enable MultiDex

  • Dir - Project/Android/app/build.gradle
1android {
2 defaultConfig {
3 ...
4 minSdkVersion 15
5 targetSdkVersion 28
6 multiDexEnabled true // add this line
7 }
8 ...
9}

Step 2: Add Multidex dependencies

Dir - Project/Android/app/build.gradle

1dependencies {
2 ...
3 def multidex_version = "2.0.1"
4 implementation 'androidx.multidex:multidex:$multidex_version'
5}

Step 3: Change Your Extends Application

  • Dir - Project/android/app/src/main/java/com/Project/MainApplication

MainApplication extends MultiDexApplication

1public class MainApplication extends MultiDexApplication implements ReactApplication {

Step 4: Run Your Project

1Project> cd android
2Project> gradlew clean
3Project> cd ..
4Project> npx react-native run-android

Please clap for your solved error…

Looking For React Native Tutorial?

we are trying to create the best Tutorial for react native developers.

When you want a daily updates about React Native Tutorial or infinitbility update subscribe to our newsletter.

Read React Native Tutorial

Request New Tutorial or Article on mail [email protected]

Join our email list and get notified about new content

No worries, I respect your privacy and I will never abuse your email.

Every week, on Tuesday, you will receive a list of free tutorials I made during the week (I write one every day) and news on other training products I create.

More articles from Infinitbility

React native video example with custom control

React native video example with custom control

Create video player in react native

April 24th, 2021 · 1 min read
how to make bootable pendrive for win 10

how to make bootable pendrive for win 10

how to make bootable pendrive

April 23rd, 2021 · 1 min read
© 2020–2021 Infinitbility
Disclaimer
Link to $https://medium.com/infinitbilityLink to $https://www.facebook.com/InfinitbilityLink to $https://github.com/infinitbilityLink to $https://twitter.com/infinitbilityLink to $https://www.buymeacoffee.com/infinitbilityLink to $mailto:[email protected]